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 4 of 4

Thread: GLUT with Code Warrior for windows please help

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2003
    Location
    Montreal
    Posts
    4

    GLUT with Code Warrior for windows please help

    Hello everyone,
    I am having considerable troulbe just getting GLUT to work.

    I've put the glut32.dll in C:\WINDOWS\system32\

    Then the glut.h to C:\Program Files\Metrowerks\CodeWarrior\Win32-x86
    Support\Headers\Win32 SDK\GL\

    adn then the glut32.lib to C:\Program Files\Metrowerks\CodeWarrior\Win32-x86
    Support\Libraries\Win32 SDK\

    Then when I create a C++ console application, I add the libaries: glu32.lib, glut32.lib and opengl32.lib

    In my main CPP file I have included the header files in this way:

    #include <windows.h>
    #include <wingdi.h>
    #include <GL/gl.h>
    #include <GL/glut.h>

    And then an almost empty main.

    When I try to compile I get the following errors:

    Error : ambiguous access to overloaded function
    'std::exit(int)'
    'exit(int)'
    glut.h line 486 nit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); }

    Error : ambiguous access to overloaded function
    'std::exit(int)'
    'exit(int)'
    glut.h line 503 _ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }

    Error : ambiguous access to overloaded function
    'std::exit(int)'
    'exit(int)'
    glut.h line 549 CK(void (GLUTCALLBACK *func)(int)) { return __glutCreateMenuWithExit(func, exit); }

    Am I missing something? some setting in Code warror?

    Please help.

    Thank you,

    Pancho

  2. #2
    Junior Member Regular Contributor
    Join Date
    Sep 2003
    Location
    Bucharest, Romania
    Posts
    143

    Re: GLUT with Code Warrior for windows please help

    Hi,
    I'm also using MW CW with OpenGL and GLU, but not GLUT. I think you should also include the glu.h in your program. I am placing all GL headers and libraries into the source code folder.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,755

    Re: GLUT with Code Warrior for windows please help

    Sounds like you have a similar problem to this thread.

    See my suggestion at the bottom and try that.
    Deiussum
    Software Engineer and OpenGL enthusiast

  4. #4
    Junior Member Newbie
    Join Date
    Dec 2003
    Location
    Montreal
    Posts
    4

    Re: GLUT with Code Warrior for windows please help

    Originally posted by Deiussum:
    Sounds like you have a similar problem to this thread.

    See my suggestion at the bottom and try that.
    Deiussum: You're a genius. I love you.

    Thank you so much,

    Pancho

Posting Permissions

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