when i tried to compile a sample code downloaded from the net, my MS VisualC++ give me error:
--------------------Configuration: e - Win32 Debug--------------------
Compiling…
e.cpp
d:\gl\gl.h(1135) : error C2144: syntax error : missing ‘;’ before type ‘void’
d:\gl\gl.h(1135) : error C2501: ‘WINGDIAPI’ : missing storage-class or type specifiers
d:\gl\gl.h(1135) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
e.obj - 3 error(s), 0 warning(s)
i didn’t modify the file at all, how can the gl.h have syntax error?? i tried doing it with other sample code from the net and got the same result. anyone know whats wrong here?
thanksss
now i got another one, when i try to build it. i got this:
--------------------Configuration: e - Win32 Debug--------------------
Linking…
LINK : fatal error LNK1104: cannot open file “opengl32.dll”
Error executing link.exe.
e.exe - 1 error(s), 0 warning(s)
i am sure that opengl32.dll is in my windows/system/ .it didn’t tell me what is wrong. is there anything i can try???
Ah, yeah, I apologize, you CAN add a dll file into your project. But maybe I expressed myself a tad wrong. If you add opengl32.dll to your project in the Link-tab under Project->Settings (MSVC 6), you will get this error, because the linker can’t find the file, unless you keep the dll-file in your lib-directory. This is the place where you should replace .dll with .lib
I got same problem, and I put the head file like this, #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <gl/glut.h> #include <gl\glaux.h>
but when building, it shows error message:
error C2144: syntax error : missing ‘;’ before type ‘void’
…