Results 1 to 4 of 4

Thread: Compile App using OpenGL and Visual Studios 2003

  1. #1
    Join Date
    Jan 2006
    Location
    Third rock from the sun
    Posts
    106
    Thanks
    17
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Compile App using OpenGL and Visual Studios 2003

    I am writing an application on Visual Studios .Net 2003 that uses Qt and OpenGL. I am getting multiple compile errors with the OpenGL includes.
    C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
    C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152) : error C2146: syntax error : missing ';' before identifier 'glAccum'
    C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152) : error C2182: 'APIENTRY' : illegal use of type 'void'
    C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1153) : error C2144: syntax error : 'void' should be preceded by ';'
    C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1153) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
    C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1153) : error C2086: 'int WINGDIAPI' : redefinition
    C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
    C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1153) : error C2146: syntax error : missing ';' before identifier 'glAlphaFunc'
    C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1153) : error C2182: 'APIENTRY' : illegal use of type 'void'
    :
    :
    C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1169) : fatal error C1003: error count exceeds 100; stopping compilation
    I am at a loss as to what is wrong with my setup. I have #include <windows.h> before <gl/gl.h>. Thanks much in advance!!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Compile App using OpenGL and Visual Studios 2003

    Looks like you forgot some includes. Maybe gl.h can't include some of the files it needs?

  3. #3
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compile App using OpenGL and Visual Studios 2003

    Try including qgl.h instead of gl.h. Might help.

  4. The following user says thank you to vermarajeev for this useful post:

    Rayven (26th April 2007)

  5. #4
    Join Date
    Jan 2006
    Location
    Third rock from the sun
    Posts
    106
    Thanks
    17
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compile App using OpenGL and Visual Studios 2003

    Quote Originally Posted by vermarajeev View Post
    Try including qgl.h instead of gl.h. Might help.
    That worked. Thanks for the help!!!

Similar Threads

  1. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.