View Full Version : [Linker error] undefined reference to ...

12-28-2002, 12:25 PM
Everytime I try to compile a (my first) openGL program, I get a number of errors like this:

[Linker error] undefined reference to `glClear@4'

only the last name is everytime different.
I use Dev-C++ on Windows XP...

12-29-2002, 12:13 AM
are you linking with opengl libraries?? under devcpp go to porject options and add this to linker options/additional libraries: -lopengl32 -lglu32 (i think http://www.opengl.org/discussion_boards/ubb/smile.gif)

(and of course you should also include proper header files http://www.opengl.org/discussion_boards/ubb/biggrin.gif)

[This message has been edited by miko (edited 12-29-2002).]