I cant open graphic windows in vc++6

thank you in advance,
I downloaded all the download dll,lib and h files
and I have no compiler errors

but when I use the function “glutCreateWindow”
or “auxInitWindow”
the program exit with code 1
I don’t know where is the problem.
here is the code:

int main(int argc, char** argv)

{

glutInit(&argc,argv);

glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH);

glutInitWindowSize(500,500);

glutInitWindowPosition(0,0);

glutCreateWindow("Simple");

return 0;

/* ... */

}

and here is what I get

First-chance exception in firstp.exe (NTDLL.DLL): 0xC0000005: Access Violation.
The thread 0xC30 has exited with code 1 (0x1).
The program ‘D:\A_PROTEIN\TEMP\firstp\Debug\firstp.exe’ has exited with code 1 (0x1).

the only thing i can see you are missing is a glutloop. Here is what i have, and this will create a window for you, assuming you are importing the right stuff:

 
int main ( int argc, char** argv )
{

   glutInit ( &argc, argv );
   
   glutInitDisplayMode ( GLUT_RGB | GLUT_DEPTH );
   glutInitWindowPosition(100,200);
   
   //this sets the size for the window
   glutInitWindowSize ( 800, 700 );
   
   //create the window with a title
   glutCreateWindow ("This is a window title");
   
   init();
      
   //this is the method that will have all the draw stuff.
   glutDisplayFunc (display);
   glutIdleFunc (display);

 
   glutMainLoop ();
   return 0;
   
}//main(int,int) 

You might need a display function, not sure though, but this should work, as i am working with VC++ 6

lso these are the libraries that i am calling:

#include <GL/glut.h>
#include <stdio.h>
#include <stdlib.h>

Need to see all of the code that you are using?
Not enought to tell what is causing the error.

thanks,but this promlem occur in all the example code that I downloaded and it’s run O.K in other computers so I don’t know where is the problem in my computer.

Try updating the openGL video drivers for your video card.

Originally posted by shay ophir:
thanks,but this promlem occur in all the example code that I downloaded and it’s run O.K in other computers so I don’t know where is the problem in my computer.

thanks,
but how can I do this?

it’s O.K. I found the driver and it’s work correctly.