missing ; before void in gl.h
Hi!
Decided to try out OpenGL for a change, problem is that when I try to compile I get an error saying "error C2144: syntax error : missing '';'' before type ''void''" In gl.h I´m using VC++ 6.0 and Win XP. Anyone else got this problem?
Really? Or does this only go for the visual studio opengl header? I've never had such problems with mingw, and it would seem slightly strange that a platform independant api requires you to include windows.h, wouldnt it?
Marijn
[edited by - marijnh on August 12, 2003 5:56:36 AM]
Marijn
[edited by - marijnh on August 12, 2003 5:56:36 AM]
The OpenGL code is platform independent, but a particular implementation may not be, as seen in this thread where the header for MS''s implementation requires windows.h.
It is not unlikely that the header you use in mingw is special for that compiler, or that you indirectly include windows.h via other headers. For example, GLUT defines the necessary symbols before including GL/gl.h so no need to include windows.h there.
It is not unlikely that the header you use in mingw is special for that compiler, or that you indirectly include windows.h via other headers. For example, GLUT defines the necessary symbols before including GL/gl.h so no need to include windows.h there.
I got my gl.h off the net i think, and i am certain i can use it without including windows.h - in fact i think i am using the same header when compiling under linux. (the wglSomething functions are in the windows headers, and no gl definitions have anything to do with non-primitive types, so i don''t see why a gl.h would require windows headers).
Marijn
Marijn
quote:Original post by marijnh
I got my gl.h off the net i think, and i am certain i can use it without including windows.h - in fact i think i am using the same header when compiling under linux. (the wglSomething functions are in the windows headers, and no gl definitions have anything to do with non-primitive types, so i don't see why a gl.h would require windows headers).
Marijn
Because of the APIENTRY and WINGDIAPI #definations.
You can not #include windows.h and
#define WINGDIAPI __declspec(dllimport)
#define APIENTRY __stdcall
before #including gl\gl.h
Edit: stupid tags
"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
[edited by - shlomisteinberg on August 12, 2003 12:11:21 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement