Compiler Error in Visual Studio 6,while adding OpenGL as header files.
Hi,
I am having compile errors when I included the OpenGL header files to a simple program. I am using Visual Studios 6.0 on Windows XP.
Code:
// Testing OpenGL includes
#include <iostream>
//#include <GL/gl.h>
//#include <GL/glu.h>
#include <gl.h>
#include <glu.h>
using namespace std;
int main()
{
cout << "Hello world" << endl;
return 0;
}
Then I get this compile error:
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1135) : error C2144: syntax error : missing ';' before type 'void'
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1135) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1135) : fatal error C1004: unexpected end of file found.
I am not sure what I need to do correct this. I thought maybe the MS Visual Studio files were bad, so I downloaded new files but I am still getting the same compile error?
Any assistance would be appreciated - thanks in advance.
Re: Compiler Error in Visual Studio 6,while adding OpenGL as header files.
I havn't had much experience with c++ but i had the same problem and this fixed it:
#pragma comment(lib, "opengl32.lib")
(u might also need to download opengl32.lib.)
if this works, plz check my post on open end game programming
Re: Compiler Error in Visual Studio 6,while adding OpenGL as header files.
Hi,
I am not sure how this worked before, but you should not be adding message map inside your thread class. Now in VC8 when compiler is more strict with type casting, static cast will fail on this. It seems like your goal is to kill all active threads on windows destroy. Then move this functionality to OnDestroy() for this window or application and kill all threads from there. This should work and get your unblock.
Thanks,