I am getting ‘unexpected end of file while looking for precompile header directive’ C1010 error.
I get this when i compile my simple VC++.net program… using GLUT I am creating a sub window that would display a sphere.
I also included stdafx.h but then it gives me more errors like C4067 & LNK2019…
any help on this will be highly appreciated… i even browsed forums, tried all recommendations but nothing helped.
thanks in advance for any help.
—Here’s my code----
#include <stdafx.h>;
#include <windows.h>;
#include <gl\glut.h>;
#include <stdlib.h>;
GLuint main_window, screen;
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glLoadIdentity();
glutSolidSphere(10, 20, 20);
glFlush();
}
void init(void)
{
glClearColor(0.0,0.0,0.0,0.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0,1.0,0.0,1.0,-1.0,1.0);
}
int _WinMain(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(640,480);
glutInitWindowPosition(100,100);
main_window = glutCreateWindow(“Welcome to blah blah”);
init();
glutCreateSubWindow(main_window,100,25,515, 430);
glutDisplayFunc(display);
glutMainLoop();
return 0;
}