Hi!
I have a DLL that compiles perfectly in VC++6 and uses the templates
#include #include #include
but when I include the following headers
#include <gl\gl.h> // Header File For The OpenGL32 Library #include <gl\glu.h> // Header File For The GLu32 Library #include <gl\glaux.h> // Header File For The Glaux Library
I get these errors:
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing ‘;’ before type ‘void’
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2501: ‘WINGDIAPI’ : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : fatal error C1004: unexpected end of file found
Please, does anyone know a solution?
Do I have to include other templates?
hmmm, not sure what youre problem is. But if are using STL then you should use the standard namespace.
So after youre header inclusion, add…
using namespace std;
Hope it works man.
Including windows.h before gl/gl.h is all you need to do to get get the OpenGL header included properly. If you get more/other compiler errors, it’s because of some other files you use.
Did you, by the way, include winuser.h before windows.h? Should be after, if you need to include it at all.