problems with DevC++

Started by
10 comments, last by GameDev.net 17 years, 5 months ago
i get these messages on the linker: lesson1.cpp: undefined reference to `ChoosePixelFormat@8' lesson1.cpp: undefined reference to `SetPixelFormat@12' only these 2 messages no more, the project parameters are: -lopengl32 -lglaux -lglu32 when i add #include <gl\glut.h> i get even more messages: lesson1.cpp: undefined reference to `__glutInitWithExit@12' :lesson1.cpp: undefined reference to `__glutCreateWindowWithExit@8' lesson1.cpp: undefined reference to `__glutCreateMenuWithExit@8' :lesson1.cpp: undefined reference to `ChoosePixelFormat@8' lesson1.cpp: undefined reference to `SetPixelFormat@12' on another projet i get this message: gcc: -lopengl32: linker input file unused since linking not done gcc: -lglaux: linker input file unused since linking not done gcc: -lglu32: linker input file unused since linking not done
Advertisement
i have added: #define CDS_FULLSCREEN 0x00000004 at the beginning.
all the header files are int the gl directory, i dont know why the linker is nuts.
it seems not to work, where are the linker options in devc?
Project > Project Options > Parameters >
Enter your libs in "Linker"
-lglu32 -lopengl32 etc

Though I thought you said you had already done that?

You need to make sure you have the libs somewhere Dev-C++ can find too of course. Just put the .a files in the dev C++ lib directory if you haven't already.
You need this pack for devc++:
http://devpaks.org/details.php?devpak=4 <-- Glaux DevPak

and under parameters you need to add:
-D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS

and under linker you need to place this:
-lopengl32 -lglu32 -lglaux -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32

Hope it works! it does for me.
Try not to download libraries directly, I face a lot of problems when I do so as well.

Just go to "Search for updates and packages" in the menu and select "Devpaks.org" and find the required OpenGL libraries/extensions and install them, this will get installed correctly on your system. Then you can simply do something like File->New->Project->GLUT and all the parameters for OpenGL and glut will already be there in your build options.

--------------------------------------Amaze your friends! Astound your family! Kennify your text!

i have deistalled devc4 and installed devc5 then i iststlled the glaux package and the openglut package and i still get the same messages, do i need another one?
Have you tried the parameter trick? I'm sure that works. However it immidiatly means you need to have a project file with it, create a new project, add the C/C++ file, change the parameters and try to compile.
is there any place where i cn download all the nehe tutorials as a zip file?
the first lessons in NeHe's tutes also have ports for a lot of languages. the ones for DevC++ work for me, try copy-pasting the linker parameters from one of the lessons to your project.

hope this helps, that's how i did it =D

This topic is closed to new replies.

Advertisement