Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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