Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Compile errors when including OpenGL headers


  • Please log in to reply

#1
dubucam

dubucam

    New Member

  • Member
  • Pip
  • 2 posts
Hi,

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.
  • 0

Advertisements


#2
mooncrawler

mooncrawler

    New Member

  • Member
  • Pip
  • 7 posts
http://www.opengl.or...tingstarted.htm tells a lot about location of include files and libs. Both the 'missing ;' and 'missing storage-class' error messages appear when a variable type is not found, so probably in gl.h there are references to other files that are missing.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP