I am having a problem getting an opengl app to compile an link with visual c++ 6 (as well as other compilers/linkers). I am just using gl.h and windows.h. the weird thing is that apps using GLUT work (compile link and run). the error is as follows:
--------------------Configuration: opengl app - Win32 Debug--------------------
Compiling...
main.cpp
c:\program files\microsoft visual studio\vc98\include\windef.h(121) : warning C4005: 'APIENTRY' : macro redefinition
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(80) : see previous definition of 'APIENTRY'
c:\documents and settings\n e i l\my documents\c++ projects\opengl app\tga.h(17) : warning C4200: nonstandard extension used : zero-sized array in struct/union
c:\documents and settings\n e i l\my documents\c++ projects\opengl app\main.cpp(228) : warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data
opengl.cpp
c:\program files\microsoft visual studio\vc98\include\windef.h(121) : warning C4005: 'APIENTRY' : macro redefinition
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(80) : see previous definition of 'APIENTRY'
c:\documents and settings\n e i l\my documents\c++ projects\opengl app\tga.h(17) : warning C4200: nonstandard extension used : zero-sized array in struct/union
tga.cpp
c:\documents and settings\n e i l\my documents\c++ projects\opengl app\tga.h(17) : warning C4200: nonstandard extension used : zero-sized array in struct/union
Linking...
main.obj : error LNK2001: unresolved external symbol __imp__wglDeleteContext@4
main.obj : error LNK2001: unresolved external symbol __imp__wglMakeCurrent@8
main.obj : error LNK2001: unresolved external symbol __imp__wglCreateContext@4
opengl.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0
opengl.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode@4
opengl.obj : error LNK2001: unresolved external symbol __imp__glViewport@16
opengl.obj : error LNK2001: unresolved external symbol __imp__glTexImage2D@36
opengl.obj : error LNK2001: unresolved external symbol __imp__glTexParameteri@12
opengl.obj : error LNK2001: unresolved external symbol __imp__glBindTexture@8
opengl.obj : error LNK2001: unresolved external symbol __imp__glGenTextures@8
opengl.obj : error LNK2001: unresolved external symbol __imp__glFlush@0
opengl.obj : error LNK2001: unresolved external symbol __imp__glHint@8
opengl.obj : error LNK2001: unresolved external symbol __imp__glDepthFunc@4
opengl.obj : error LNK2001: unresolved external symbol __imp__glEnable@4
opengl.obj : error LNK2001: unresolved external symbol __imp__glClearDepth@8
opengl.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16
opengl.obj : error LNK2001: unresolved external symbol __imp__glShadeModel@4
opengl.obj : error LNK2001: unresolved external symbol __imp__glRotatef@16
opengl.obj : error LNK2001: unresolved external symbol __imp__glPopMatrix@0
opengl.obj : error LNK2001: unresolved external symbol __imp__glEnd@0
opengl.obj : error LNK2001: unresolved external symbol __imp__glVertex3f@12
opengl.obj : error LNK2001: unresolved external symbol __imp__glTexCoord2f@8
opengl.obj : error LNK2001: unresolved external symbol __imp__glBegin@4
opengl.obj : error LNK2001: unresolved external symbol __imp__glTranslatef@12
opengl.obj : error LNK2001: unresolved external symbol __imp__glPushMatrix@0
opengl.obj : error LNK2001: unresolved external symbol __imp__glOrtho@48
opengl.obj : error LNK2001: unresolved external symbol __imp__glClear@4
Debug/opengl app.exe : fatal error LNK1120: 27 unresolved externals
Error executing link.exe.
opengl app.exe - 28 error(s), 6 warning(s)
Thanks for any help anyone can offer.
--------------------Configuration: opengl app - Win32 Debug--------------------
Compiling...
main.cpp
c:\program files\microsoft visual studio\vc98\include\windef.h(121) : warning C4005: 'APIENTRY' : macro redefinition
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(80) : see previous definition of 'APIENTRY'
c:\documents and settings\n e i l\my documents\c++ projects\opengl app\tga.h(17) : warning C4200: nonstandard extension used : zero-sized array in struct/union
c:\documents and settings\n e i l\my documents\c++ projects\opengl app\main.cpp(228) : warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data
opengl.cpp
c:\program files\microsoft visual studio\vc98\include\windef.h(121) : warning C4005: 'APIENTRY' : macro redefinition
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(80) : see previous definition of 'APIENTRY'
c:\documents and settings\n e i l\my documents\c++ projects\opengl app\tga.h(17) : warning C4200: nonstandard extension used : zero-sized array in struct/union
tga.cpp
c:\documents and settings\n e i l\my documents\c++ projects\opengl app\tga.h(17) : warning C4200: nonstandard extension used : zero-sized array in struct/union
Linking...
main.obj : error LNK2001: unresolved external symbol __imp__wglDeleteContext@4
main.obj : error LNK2001: unresolved external symbol __imp__wglMakeCurrent@8
main.obj : error LNK2001: unresolved external symbol __imp__wglCreateContext@4
opengl.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0
opengl.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode@4
opengl.obj : error LNK2001: unresolved external symbol __imp__glViewport@16
opengl.obj : error LNK2001: unresolved external symbol __imp__glTexImage2D@36
opengl.obj : error LNK2001: unresolved external symbol __imp__glTexParameteri@12
opengl.obj : error LNK2001: unresolved external symbol __imp__glBindTexture@8
opengl.obj : error LNK2001: unresolved external symbol __imp__glGenTextures@8
opengl.obj : error LNK2001: unresolved external symbol __imp__glFlush@0
opengl.obj : error LNK2001: unresolved external symbol __imp__glHint@8
opengl.obj : error LNK2001: unresolved external symbol __imp__glDepthFunc@4
opengl.obj : error LNK2001: unresolved external symbol __imp__glEnable@4
opengl.obj : error LNK2001: unresolved external symbol __imp__glClearDepth@8
opengl.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16
opengl.obj : error LNK2001: unresolved external symbol __imp__glShadeModel@4
opengl.obj : error LNK2001: unresolved external symbol __imp__glRotatef@16
opengl.obj : error LNK2001: unresolved external symbol __imp__glPopMatrix@0
opengl.obj : error LNK2001: unresolved external symbol __imp__glEnd@0
opengl.obj : error LNK2001: unresolved external symbol __imp__glVertex3f@12
opengl.obj : error LNK2001: unresolved external symbol __imp__glTexCoord2f@8
opengl.obj : error LNK2001: unresolved external symbol __imp__glBegin@4
opengl.obj : error LNK2001: unresolved external symbol __imp__glTranslatef@12
opengl.obj : error LNK2001: unresolved external symbol __imp__glPushMatrix@0
opengl.obj : error LNK2001: unresolved external symbol __imp__glOrtho@48
opengl.obj : error LNK2001: unresolved external symbol __imp__glClear@4
Debug/opengl app.exe : fatal error LNK1120: 27 unresolved externals
Error executing link.exe.
opengl app.exe - 28 error(s), 6 warning(s)
Thanks for any help anyone can offer.