🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

its probably a dumb question...

Started by
4 comments, last by Caste 14 years, 10 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?
Advertisement
What errors do you get ? Seems like you do not set up OpenGL correctly in your project.
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