Question : Strange errors when compiling and OpenGL program

I'm trying to compile an OpenGL program in Visual C++ .NET but I'm getting lots of funny errors. The funny thing is, none of these errors are to do with my program, they're to do with the OpenGL libraries. A few of the errors are...
1:
2:
3:
4:
5:
6:
7:
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152): error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152): error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152): error C2146: syntax error : missing ';' before identifier 'glAccum'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152): error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1153): error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1153): error C2086: 'int WINGDIAPI' : redefinition

Although it's quoting errors with GL.h I have other OpenGL programs which compile fine using GL.h so it must be an error in my program. I've included gl/gl.h and gl/glu.h but I can't think of anything else I could do.

Any ideas?

Darrell

Answer : Strange errors when compiling and OpenGL program

>In my additional dependencies I do have the following included "opengl32.lib glu32.lib" so I don't think it's that.
No, this will only raise linking errors.

I think you missed to include some common header file, but I can't imagine which.
For the errors above try to include <wtypes.h> OR <windef.h>
Random Solutions  
 
programming4us programming4us