Skip to main content
GameDev.net gamedev.net
🔒 Locked

Probs with DevCpp

Started by vlad_tepes Mar 20, 2005 at 1:24 PM 2 replies 1k views
Original Post
vlad_tepes
vlad_tepes
I don't have an idea where i should post this problem, but i think maybe it's right to post it here. my prob is my compiler devcpp. i have a project, a game, and i need the glut functions. so my linker has the order to link with glut.lib via project options and via #pragma comment( lib, "glut.lib"). but it doesn't work. the programm couldn't be build because he cannot find the glut functions... i don't know what i should do with this compiler: DevC++ it is! how you know some solution for my problem.
--- we hit the highscore ---www.Gamag.org
fyhuang
fyhuang
The #pragma you're using only works with Microsoft compilers IIRC. You should instead look to the project options (wherever those are).

Cheers!
- fyhuang [ site ]
Drew_Benton
Drew_Benton
Quote:
Original post by fyhuang
The #pragma you're using only works with Microsoft compilers IIRC. You should instead look to the project options (wherever those are).

Cheers!


Correct! In Dev-CPP it does things a bit different. If the library is in the standard dev-cpp lib folder (as glut is), then you can do this:

Project->Project Options->Parameters->Linker then add in "-lglut32" to that box.

Alternatively, you can go to that box and hit the Add Library or object and choose the "libglut32.a" file from the directory it resides in. You can do the same for the other libaries.

Opengl32.lib ==> "-lopengl32"
glu32.lib ==> "-lglu32"
...
vlad_tepes
vlad_tepes
okay i did this to the Linker:

-lopengl32
-lglut32
-lglut
-lglu32
-lglaux

and i m getting this probs here:

[Linker error] undefined reference to __glutInitWithExit@12'
[Linker error] undefined reference to
__glutCreateWindowWithExit@8'
[Linker error] undefined reference to __glutCreateMenuWithExit@8'
[Linker error] undefined reference to
__glutInitWithExit@12'
[Linker error] undefined reference to __glutCreateWindowWithExit@8'
[Linker error] undefined reference to
__glutCreateMenuWithExit@8'
ld returned 1 exit status
C:\Dokumente und Einstellungen\vlad1\Desktop\Lost-Signal\Makefile.win [Build Error] ["Lost] Error 1
--- we hit the highscore ---www.Gamag.org

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.