Results 1 to 4 of 4

Thread: Problems include glu.h

  1. #1
    Senior Member Regular Contributor
    Join Date
    Sep 2005
    Location
    Dayton
    Posts
    148

    Problems include glu.h

    I am trying to #include <gl\glu.h> inside windows running VS 2003.NET. After adding the include line to my .h file I get 100+ errors, apparently with "gl\gl.h". Here is a sampling of the errors I am getting.

    C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152): error C2144: syntax error : 'void' should be preceded by ';'
    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'
    How do I get around these errors, especially since I did not create them. Thanks!

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,102

    Re: Problems include glu.h

    You have to include <windows.h> before any OpenGL headers.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Sep 2005
    Location
    Dayton
    Posts
    148

    Re: Problems include glu.h

    I had just found that searching through google, but thanks!

  4. #4
    Senior Member Regular Contributor
    Join Date
    Feb 2005
    Location
    South Tyrol, Italy
    Posts
    107

    Re: Problems include glu.h

    And also don't ever use a backslash in your includes!!! -> #include <GL/gl.h>

Similar Threads

  1. include problems
    By ascaron in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 06-18-2012, 01:01 PM
  2. Replies: 3
    Last Post: 10-28-2009, 08:49 AM
  3. glext.h include problems with MSVC++
    By Cheps in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-28-2004, 06:51 AM
  4. Include file problems!!!
    By DeathBySamsara in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 12-06-2002, 01:22 PM
  5. gl.h include problems
    By mcbastian in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-02-2001, 03:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean