Hi
I read the OpenGL Programming Guide. But I can’t run the first program. Can anybody help me please?
The Program:
#include “windows.h”
#include “GL\gl.h”
#include “GL\glaux.h”
void main ()
{
auxInitDisplayMode(AUX_SINGLE | AUX_RGBA);
auxInitPosition(0,0,500,500);
auxInitWindow(“Test”);
glClearColor(0.0,0.0,0.0,0.0);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0,1.0,1.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-1.0,1.0,-1.0,1.0,-1.0,1.0);
glBegin(GL_POLYGON);
glVertex2f(-0.5,-0.5);
glVertex2f(-0.5,0.5);
glVertex2f(0.5,0.5);
glVertex2f(0.5,-0.5);
glEnd();
glFlush();
Sleep(10);
}
The Error:
--------------------Konfiguration: OpenGL2 - Win32 Debug--------------------
Linker-Vorgang läuft…
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__glFlush@0
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__glEnd@0
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__glVertex2f@8
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__glBegin@4
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__glOrtho@48
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__glLoadIdentity@0
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__glMatrixMode@4
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__glColor3f@12
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__glClear@4
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__glClearColor@16
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol _auxInitWindowA@4
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol _auxInitPosition@16
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol _auxInitDisplayMode@4
LIBCD.lib(wincrt0.obj) : error LNK2001: Nichtaufgeloestes externes Symbol _WinMain@16
Debug/OpenGL2.exe : fatal error LNK1120: 14 unaufgeloeste externe Verweise
Fehler beim Ausführen von link.exe.
OpenGL2.exe - 15 Fehler, 0 Warnung(en)
Please help me!!!
Much thanks