views:

713

answers:

2

I'm sure that there is nothing wrong with my project. Because I have tried it on my ex computer with visual studio 2005 and windows xp pro, and it works error-free.

I can compile my project. There is no errors on build phase.But when I try to run my project it says "*.exe has stopped working".

Then I runned it on debugger mode. I saw that it leads me to that line in glut.h

static int APIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }

I really don't understand why it is not working..

I copied glut32.dll to C:\Windows\System32 glut.h to C:\Program Files\Microsoft Visual Studio 9.0\VC\include\GL and glut32.lib to C:\Program Files\Microsoft Visual Studio 9.0\VC\lib

A: 

Did you try turning off DEP (data execution prevention) on your application?
Right click on my computer and go into the virtual memory settings. Under the DEP tab, add your application to the ignore list.
You might need a new glut.h, or to rewrite yours. I.e., a different GLUT library.

Chris
A: 

I see errors like this a lot -- what other files are you including? Try to include "glut.h" before or after all the other headers. Also, if you include glut.h, you don't need gl.h or glu.h -- they're included automatically.

For some reason, the glut.h doesn't play well with the other headers. There might be a more technical answer to the question or a better fix, but changing the order has always worked for me!

JPhi1618