its probably a dumb question...
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.
error LNK2001: unresolved external symbol [various commands]
the commands are like gluPerspective@32 or glLoadIdentity@0
the commands are like gluPerspective@32 or glLoadIdentity@0
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?
But usually the projects should run out of the box.. Can you please tell me which one you downloaded?
Member of the NeHe team | PhD Student at Heidelberg Collaboratory for Image Processing | ProCamera Developer
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement