Question

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 are no errors in build phase. But when I try to run my project it says "*.exe has stopped working".

Then I ran it on debug mode. I saw that it leads me to a 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

Was it helpful?

Solution

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.

OTHER TIPS

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!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top