Results 1 to 3 of 3

Thread: Compiler Error in Visual Studio 6,while adding OpenGL as header files.

  1. #1
    Join Date
    Jan 2009
    Posts
    125

    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.

  2. #2
    Join Date
    Dec 2008
    Posts
    18

    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

  3. #3
    Join Date
    Nov 2008
    Posts
    29

    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,

Similar Threads

  1. Replies: 5
    Last Post: 15-06-2011, 07:10 AM
  2. Replies: 2
    Last Post: 16-02-2011, 02:49 PM
  3. Replies: 3
    Last Post: 12-11-2010, 03:38 AM
  4. Replies: 4
    Last Post: 19-01-2010, 05:40 PM
  5. Difference between Visual studio 2005 and Visual studio 2008
    By RohanS in forum Software Development
    Replies: 3
    Last Post: 12-06-2009, 10:48 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,514,499.00301 seconds with 16 queries