dev C++ openGL compile problems - fix
Posted: Thu Oct 07, 2004 8:53 am
i wouldn't be surprised if a lot of people get these kindof errors while learning to program.
basically if you are having trouble compiling things you have just downloaded from the net (ie: tutorials) you are likely having trouble with the "linking".
there seems to be a lot of explanations of howto deal with that around the net. but since it helped me, i'll shove it here too.
click through to project/options/parameters. under linker add this in there:
-lopengl32 -lglut32 -lglu32
you may need more. but this is general idea of howto link librarys in devcpp. you'll notice that in the filesystem librarys will be called stuff like libopengl32.a , this means you link it you type in -lopengl32 (ie: leave off the lib, add in a -L, no space, and leave off the extension)
anyway, after you have fixed that you may still be getting these problems, which look like linking problems, but actually are NOT....
basically if you are having trouble compiling things you have just downloaded from the net (ie: tutorials) you are likely having trouble with the "linking".
there seems to be a lot of explanations of howto deal with that around the net. but since it helped me, i'll shove it here too.
click through to project/options/parameters. under linker add this in there:
-lopengl32 -lglut32 -lglu32
you may need more. but this is general idea of howto link librarys in devcpp. you'll notice that in the filesystem librarys will be called stuff like libopengl32.a , this means you link it you type in -lopengl32 (ie: leave off the lib, add in a -L, no space, and leave off the extension)
anyway, after you have fixed that you may still be getting these problems, which look like linking problems, but actually are NOT....
this really helped me. and took a while to find online, so.. splat... here it is for others.- When you attempt to link the library functions, you may get a linker error of '__glutInitWithExit@12', '__glutCreateWindowWithExit@8', or '__glutCreateMenuWithExit@8'. If you get these errors, you must add the line:
#define GLUT_DISABLE_ATEXIT_HACK
to the top of file before the includes. According to the glut header this "enabled features before defining the upper macro."