Reputation: 429
I want to use GLUT to simplify my code and work.
I'm using windows 7 (64 bit) and Visual Studio 2010. I did everything like in this tutorial and still can't compile my code... I get these errors:
Error 2 error LNK1120: 1 unresolved externals <path>
Error 1 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartuL
The code I use:
#include <GL/glew.h>
#include <GL/glut.h>
void display (void) {
glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glLoadIdentity();
glFlush();
}
int main (int argc, char **argv) {
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_SINGLE);
glutInitWindowSize (500, 500);
glutInitWindowPosition (100, 100);
glutCreateWindow ("Your first OpenGL Window");
glutDisplayFunc(display); /
glutMainLoop();
}
Does someone know whats the problem and how to fix it?
Upvotes: 1
Views: 188
Reputation: 4668
Seems that your created Windows application instead of a Console one. See the pic below for how to change/choose the Windows subsystem
Upvotes: 1