Trouble including gl/glu.h
Hi, I kinda new in using OpenGl, I'm trying to include glu.h by simply doing this :
#include <gl/glu.h>
it seems fine, as I saw other project doing this and it compiled correctly but when I got to do this I always get like 100s of errors.
mostly this error :
"e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152): error C2501: 'WINGDIAPI' : missing storage-class or type specifiers"
can somebody tell me what to do ?
I'm using VC .net, is there anything that my VC/proj settings I have to change ?
How come other projects compiled correctly (on the same VC) ?
thanks ;) that solved the problem but now comes another problem..
I got all this unresolved external symbol error like this when linking/building the project :
"engine1 error LNK2019: unresolved external symbol _gluNewTess@0 referenced in function "public: void __thiscall CPolygon::Tesselate(void)" (?Tesselate@CPolygon@@QAEXXZ)"
now I know this maybe because I forget to include some lib, but I've done that in my project settings, I've allready add glut.lib and glut32.lib to my project linker settings.
Are there any settings that I must add/change ??
I got all this unresolved external symbol error like this when linking/building the project :
"engine1 error LNK2019: unresolved external symbol _gluNewTess@0 referenced in function "public: void __thiscall CPolygon::Tesselate(void)" (?Tesselate@CPolygon@@QAEXXZ)"
now I know this maybe because I forget to include some lib, but I've done that in my project settings, I've allready add glut.lib and glut32.lib to my project linker settings.
Are there any settings that I must add/change ??
I think you need to link in opengl32.lib and glu32.lib -
Also I do not think there is a "glut.lib" file, so if it says it cannot be found, then remove it. The correct one is as you have, glut32.lib. Here is the reference for that.
- Drew
#pragma comment(lib,"glu32.lib")#pragma comment(lib,"opengl32.lib")
Also I do not think there is a "glut.lib" file, so if it says it cannot be found, then remove it. The correct one is as you have, glut32.lib. Here is the reference for that.
- Drew
dont pragma comment your libs, not all compilers interpret #pragma the same way, instead use the project options so you dont run into trouble
hope that helps
-Dan
hope that helps
-Dan
Quote:Original post by Drew_Benton
I think you need to link in opengl32.lib and glu32.lib -#pragma comment(lib,"glu32.lib")#pragma comment(lib,"opengl32.lib")
Also I do not think there is a "glut.lib" file, so if it says it cannot be found, then remove it. The correct one is as you have, glut32.lib. Here is the reference for that.
- Drew
add those two libs to your project with add exisiting item under the project menu
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement