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

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.

Sounds like you have a similar problem to this thread.

See my suggestion at the bottom and try that.

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

See my suggestion at the bottom and try that.[/b]

Deiussum: You’re a genius. I love you.

Thank you so much,

Pancho