Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Compiling programs with OpenGL & GLUT with VC++6

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Marseille, France
    Posts
    3

    Compiling programs with OpenGL & GLUT with VC++6

    Hello,

    I didn't manage to compile under W2k my school project.
    VC++6 found errors into gl.h
    " WINGDIAPI " is not recognized
    I've tried to delete all the WINGDIAPI, and then the errors are
    " APIENTRY"
    I've tried to delete all the APIENTRY, ant then the errors are in winnt.h where some strut are declared without name..

    What is the good way to compile ? are there particular settings ?

    Thanks for reading and/or replying

  2. #2
    Intern Contributor
    Join Date
    Sep 2000
    Location
    Copenhagen, Denmark
    Posts
    61

    Re: Compiling programs with OpenGL & GLUT with VC++6

    Well, I'm not running Win2K, but I am using VC++ 6.0 so the approach should be the same. When setting up a glut application I do the following:

    Go to the "File" menu and pick "New". Select the "Project" tab and select "Win32 Console application". It's important that you don't choose "Win32 Application". If you do that you will get the exact link error you are talking about so that may be your problem. Next got to the "Project" menu and pick "Settings". Click the link tab and add "Glut32.lib" in the field where it says "Object/library modules". Click O.K. and you should be all set.

    Hope this helps

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Marseille, France
    Posts
    3

    Re: Compiling programs with OpenGL & GLUT with VC++6

    Thank You very much !!

    It works now !!
    I didn't specified win32 application, and for the WINGDIAPI error, I had to include glut.h before gl.h ( even in files using only opengl )

    One more time Thanks for your answer

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    SWEDEN
    Posts
    718

    Re: Compiling programs with OpenGL & GLUT with VC++6

    gl.h requires that windows.h is included first, GLUT does this automatically for you, but if you don't use GLUT you'll have to include windows.h manually.

  5. #5
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Marseille, France
    Posts
    3

    Re: Compiling programs with OpenGL & GLUT with VC++6

    Thanks you too, I understand now what happened

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •