linker errors
hey everyone, i'm trying to create a window with opengl stuff, from the lesson 1 code for a simple one.. i'm getting lots of linker errors tho, and i'm not sure how to fix them. Possibly i'm not including or linking these correctly.. #include <gl\gl.h> #include <gl\glu.h> #include <gl\glaux.h> the kind of errors that i'm gettin are these.. First Windows error LNK2019: unresolved external symbol __imp__glClear@4 referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) can anyone help me to sort these out?? Thanks
Any time you get an "unresolved external symbol" error for a symbol that you didn't define yourself, it almost always means you forgot to link to a library. I have seen this sort of error with DirectX many times, and the solution is to make sure you are linking to d3d8.lib, dxguid.lib, etc. So just link to the appropriate OpenGL library(s) and you should be fine. (Generally this is done through the linker input section of the project settings, but it varies by IDE.)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement