PDA

View Full Version : GLUT with Code Warrior for windows please help



Pancho
12-02-2003, 07:21 PM
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

Tzupy
12-03-2003, 03:34 AM
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.

Deiussum
12-03-2003, 05:19 AM
Sounds like you have a similar problem to this (http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/014719.html) thread.

See my suggestion at the bottom and try that.

Pancho
12-06-2003, 10:49 AM
Originally posted by Deiussum:
Sounds like you have a similar problem to this (http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/014719.html) thread.

See my suggestion at the bottom and try that.

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

Thank you so much,

Pancho