I am building a simple progam using some glut commands. The program runs and compiles at school, and I can get it to compile on my home computer, but when i go to build it using vs c++ i get and unresolved external _WinMain@16.
Here’s the code. I did download glut.h, glut32.lib, glut.lib, and the .dlls. I’d appreciate your help.
Thanks
springec@cwu.edu
#include<windows.h>
#include<gl/GL.h>
#include<gl/GLAUX.h>
#include<gl/GLU.h>
#include<gl/glut.h>
#include<basetsd.h>
void myInit(void)
{
glClearColor(1.0, 1.0, 1.0, 0.0);
glColor3f(0.0f, 0.0f, 0.0f);
glPointSize(4.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0, 640.0, 0.0, 480.0);
}
void myDisplay(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POINTS);
glVertex2i(100, 50);
glVertex2i(100, 130);
glVertex2i(150, 13);
glEnd();
glFlush();
}
void main(int argc, char** argv)
{ glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE
| GLUT_RGB);
glutInitWindowSize(640, 480);
glutInitWindowPosition(100, 150);
glutCreateWindow(“my first atempt”);
glutDisplayFunc(myDisplay);
myInit();
glutMainLoop();
}