SFML community forums

Help => Window => Topic started by: Assimodeus on December 13, 2008, 03:19:31 pm

Title: Undefined Reference Errors
Post by: Assimodeus on December 13, 2008, 03:19:31 pm
Hey guys,

i got a problem compiling one of the Window-Tutorials (the very first writing a simple Window without Event-Handling).

(http://teleportratten.te.funpic.de/SFML_eclipse_errors.JPG)

So i got 3 'undefined Reference' Errors:

I calling the constructor

II calling the member-function "Display()" of "Window App"

III calling the Destructor ~Window()


But..why?

My IDE is Eclipse 3.4.0 (CDT Plugin) using the MinGW/GCC Toolchain (ver. unknown, probably 4.1/4.2).

I'm grateful for every helpful hint.



PS:  SeFu was used & google is my friend.
Title: Undefined Reference Errors
Post by: Avency on December 13, 2008, 06:37:39 pm
Did you add the libraries to the linker settings?

(Properties -> C/C++ Build -> Settings -> GCC C++ Linker -> Libraries)
Title: Undefined Reference Errors
Post by: Wizzard on December 13, 2008, 11:10:09 pm
Remember to define SFML_DYNAMIC if you're not using the static libraries.
Title: Undefined Reference Errors
Post by: Assimodeus on December 14, 2008, 04:40:15 am
Quote from: "Avency"
Did you add the libraries to the linker settings?

(Properties -> C/C++ Build -> Settings -> GCC C++ Linker -> Libraries)


Yes, i made it up now, but the same errors occured.


Quote from: "Wizzard"
Remember to define SFML_DYNAMIC if you're not using the static libraries.


Could you show me your hint more detailed, please?
Title: Undefined Reference Errors
Post by: Wizzard on December 14, 2008, 06:53:26 am
Just use the libraries that contain "-s" in their name until you get all your other errors figured out.
Title: Undefined Reference Errors
Post by: Assimodeus on December 15, 2008, 05:39:23 pm
You mean -d ?

I got a subproblem relating to libraries.
If i assign specific libs to the project (in the way Avency described)
i get "No such File" errors".
And if i assign a lib directory, nothing changes.

The main problem still exists; anyway big thanks for your help so far!
Title: Undefined Reference Errors
Post by: model76 on December 15, 2008, 05:47:23 pm
No, he means -s. -d is for debug.

There is also a -s-d version for static debug.
Title: Undefined Reference Errors
Post by: Assimodeus on December 15, 2008, 11:51:46 pm
ah okay, i'll try tomorrow, reaction here by Edit.

EDIT:
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lC:\Dokumente und Einstellungen\Flo (Admin)\Desktop\privater Dev Stuff\SFML-1.3\lib\mingw\libsfml-window-s.a

but it exists there! >,<

Edit: what a weird mistake.. o,รด