Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Newbie Help  (Read 2145 times)

0 Members and 1 Guest are viewing this topic.

Sparticle

  • Newbie
  • *
  • Posts: 9
    • View Profile
Newbie Help
« on: August 27, 2009, 08:14:12 pm »
Hi,  Im trying to compile the "graphics-Sprite.cpp" example from the tutorial section on the main website but keep getting these link errors:-

1>------ Rebuild All started: Project: 3, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project '3', configuration 'Debug|Win32'
1>Compiling...
1>graphics-sprite.cpp
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>graphics-sprite.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" (__imp_?Display@Window@sf@@QAEXXZ) referenced in function _main
1>graphics-sprite.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Input::IsKeyDown(enum sf::Key::Code)const " (__imp_?IsKeyDown@Input@sf@@QBE_NW4Code@Key@2@@Z) referenced in function _main
1>graphics-sprite.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ) referenced in function _main
1>graphics-sprite.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: float __thiscall sf::Window::GetFrameTime(void)const " (__imp_?GetFrameTime@Window@sf@@QBEMXZ) referenced in function _main
1>graphics-sprite.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Close(void)" (__imp_?Close@Window@sf@@QAEXXZ) referenced in function _main
1>graphics-sprite.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::GetEvent(class sf::Event &)" (__imp_?GetEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function _main
1>graphics-sprite.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::IsOpened(void)const " (__imp_?IsOpened@Window@sf@@QBE_NXZ) referenced in function _main
1>graphics-sprite.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>C:\Users\Dean\Documents\Visual Studio 2008\Projects\sfm\Debug\3.exe : fatal error LNK1120: 8 unresolved externals
1>Build log was saved at "file://c:\Users\Dean\Documents\Visual Studio 2008\Projects\sfm\3\Debug\BuildLog.htm"
1>3 - 9 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

My configuration settings are for debug and Im linking with "sfml-graphics-d.lib" in the linker/input tab in visualC++ 2008.
The first couple of tutorials link fine but im stuck on this one.
I created the project as a Win32Console project for my soloution.
Please bear in mind im a novice at programming and new to SFML so please keep any replies as simple as possible
I was recommended to use it rather than a game engine I have put together with bits of code from various books.

Thanks.

Meltra Bour

  • Newbie
  • *
  • Posts: 28
    • View Profile
Newbie Help
« Reply #1 on: August 27, 2009, 09:14:42 pm »
You also need to link sfml-window-d.lib and sfml-system-d.lib.

Edit:
Lol now I feel like a noob, not sure if you actually need system for that tutorial, but I"m sure you need window to open up the window and manage key events :p

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Newbie Help
« Reply #2 on: August 27, 2009, 09:38:44 pm »
Quote from: "Meltra Bour"
You also need to link sfml-window-d.lib and sfml-system-d.lib.

Edit:
Lol now I feel like a noob, not sure if you actually need system for that tutorial, but I"m sure you need window to open up the window and manage key events :p


you need both

Meltra Bour

  • Newbie
  • *
  • Posts: 28
    • View Profile
Newbie Help
« Reply #3 on: August 28, 2009, 12:40:51 am »
hehe thought so, was to busy (lazy) to try it out ...
Never thought about trying to compile with out those 2 before  :mrgreen:

 

anything