I keep getting the following error using MS Visual C++ 6.0.
--------------------Configuration: Example - Win32 Debug--------------------
Linking…
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/Example.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Example.exe - 2 error(s), 0 warning(s)
Here’s my program:
#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.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 () {
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POINTS);
glVertex2i(100, 50);
glVertex2i(100, 130);
glVertex2i(150, 130);
glEnd();
glFlush();
}
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(640,480);
glutInitWindowPosition(100, 150);
glutCreateWindow(“my first attempt”);
glutDisplayFunc(myDisplay);
myInit();
glutMainLoop();
return 0;
}
I keep getting this error…so I dont’ think it has anything to do with the program. If someone could explain to me what the error means and what I can do about it I’d greatly appreciate it.