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

Author Topic: Undefined Reference Errors  (Read 4856 times)

0 Members and 1 Guest are viewing this topic.

Assimodeus

  • Newbie
  • *
  • Posts: 6
    • View Profile
Undefined Reference Errors
« 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).



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.

Avency

  • Full Member
  • ***
  • Posts: 113
    • View Profile
Undefined Reference Errors
« Reply #1 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)

Wizzard

  • Full Member
  • ***
  • Posts: 213
    • View Profile
Undefined Reference Errors
« Reply #2 on: December 13, 2008, 11:10:09 pm »
Remember to define SFML_DYNAMIC if you're not using the static libraries.

Assimodeus

  • Newbie
  • *
  • Posts: 6
    • View Profile
Undefined Reference Errors
« Reply #3 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?

Wizzard

  • Full Member
  • ***
  • Posts: 213
    • View Profile
Undefined Reference Errors
« Reply #4 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.

Assimodeus

  • Newbie
  • *
  • Posts: 6
    • View Profile
Undefined Reference Errors
« Reply #5 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!

model76

  • Full Member
  • ***
  • Posts: 231
    • View Profile
Undefined Reference Errors
« Reply #6 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.

Assimodeus

  • Newbie
  • *
  • Posts: 6
    • View Profile
Undefined Reference Errors
« Reply #7 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,รด