Click to See Complete Forum and Search --> : I get these errors while linking all OpenGL programs..any ideas on what they are?


chewieu
April 30th, 1999, 05:56 PM
Here are the errors that I get while linking programs that use Gl.h, Glut.h, and Glux.h - they are different for each program, but the TYPE of error is exactly the same I am using VC++ 6 which so far has been a HUGE problem for me - I miss Borland C++ 5.02...if anybody knows what these errors are and/or how to fix them, I would be VERY grateful. Thanks.


glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__glFlush@0
glutsolidsphere.obj : error LNK2001: unresolved external symbol _glutSolidSphere@16
glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__glClear@4
glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__glMateriali@12
glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__glMaterialfv@12
glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__glColor3f@12
glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__glColorMaterial@8
glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__glLightfv@12
glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16
glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__glFrontFace@4
glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__glEnable@4
glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__glViewport@16
glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__wglDeleteContext@4
glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__wglMakeCurrent@8
glutsolidsphere.obj : error LNK2001: unresolved external symbol __imp__wglCreateContext@4
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

Alex Black
April 30th, 1999, 11:16 PM
are you linking against any open gl librarys?

in project settings you should have some lib files, ie opengl.lib or something

- Alex

berry3238
May 3rd, 1999, 07:21 PM
Your compiler has a linker thing in it. So go to the Project-Settings in the menu. Then go to the Link tab. Then where it says
Object/Library Modules. Add the following to the space. opengl32.lib glu32.lib glaux.lib gdi32.lib and make sure that there is 1 space
in between them.