I am trying to clean up some of my older glut apps and I found that if I create a release mode and then try and run the exe separate from VC++, in windows explorer, the console and glut window just flash up and then disappear.
How can I prevent this from happening - if I can at all?
I just tried this with a win32 based glut application and a release version didn’t have a problem nor did it when I converted it to a console based app.
Here’s the code I used… which is pretty basic. Hope this helps you figure out why yours is doing that.
========================================= #include <gl\glut.h> //header file for GLUT
static void glut_render(void);
void glut_resize(int w, int h);
float xrot;
int main(int argc, char **argv)
{
// Initialise
glutInit(&argc,argv); //initializes the GLUT framework
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); //sets up the display mode
glutInitWindowSize(640,480);
glutCreateWindow(“Glut Test”); //creates a window
// Functions
glutDisplayFunc(glut_render); //specifies our redraw function
glutReshapeFunc(glut_resize);
glutIdleFunc(glut_render);
glutMainLoop(); //the main loop of the GLUT framework
return 0;
}