I am having compile errors when I included the OpenGL header files to a simple program. I need to use OpenGL for a project. I am using Visual Studios 6.0 on Windows XP; I created a workspace and used the console option.
// 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 OpenGL 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.