Advertisement

its probably a dumb question...

Started by August 19, 2009 02:30 PM
4 comments, last by Caste 15 years, 3 months ago
i am really new to open GL, and am trying to follow the tutorials on the website. i found the first one very helpfull, but when i tried to build the executable for the second one i got 20 build errors. then i tried to download the lesson code, built the executable, and still got 20 build errors. what am i doing wrong?
What errors do you get ? Seems like you do not set up OpenGL correctly in your project.
Advertisement
error LNK2001: unresolved external symbol [various commands]
the commands are like gluPerspective@32 or glLoadIdentity@0
Are you linking the opengl libraries ?
Well I'm quite sure you are not linking the OpenGL library to your project. I'm not an OpenGL user but these kinds of errors usually occur when you do not link something. You obviously include the necessary header files because the compiler knows about those functions. Again , I believe it's a linking problem
Exactly, you need to add either "OpenGL32.lib GLU32.lib" to your linker options in Visual C++, or "-lGL -lGLU" for GCC compilers.

But usually the projects should run out of the box.. Can you please tell me which one you downloaded?

This topic is closed to new replies.

Advertisement