Jump to content
  • Advertisement
Sign in to follow this  
meth

problems with DevC++

This topic is 4250 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
is there any place where i cn download all the nehe tutorials as a zip file?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!