PDA

View Full Version : Errors in VC++



ebbe
06-06-2002, 11:22 AM
Hi,

I can't even draw a OpenGl window! There's not anything wrong whith the code; it compiles great, but when I try to build it this is what I get:

Linking...
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode@4
Lesson1.obj : error LNK2001: unresolved external symbol _gluPerspective@32
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glViewport@16
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glHint@8
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glDepthFunc@4
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glEnable@4
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glClearDepth@8
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glShadeModel@4
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glClear@4
Lesson1.obj : error LNK2001: unresolved external symbol __imp__wglDeleteContext@4
Lesson1.obj : error LNK2001: unresolved external symbol __imp__wglMakeCurrent@8
Lesson1.obj : error LNK2001: unresolved external symbol __imp__wglCreateContext@4
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Lesson1.exe : fatal error LNK1120: 15 unresolved externals
Error executing link.exe.
Lesson1.exe - 16 error(s), 0 warning(s)


Anyone know what it means? I'm using VC++ 4.2 and Windows ME.

yakuza
06-06-2002, 02:00 PM
Those are all link errors, not compile errors. Make sure you're linking opengl32.lib in your project settings.

ebbe
06-06-2002, 11:29 PM
Thanx, but I still miss one file... Look at this:

Lesson1.obj : error LNK2001: unresolved external symbol _gluPerspective@32
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Lesson1.exe : fatal error LNK1120: 2 unresolved externals


Still to linking errors

Ebbe

coredump
06-07-2002, 02:27 AM
Thanx, but I still miss one file...

glu32.lib

b

Deiussum
06-07-2002, 04:23 AM
Unresolved Symbol _main means that you started your app as a Win32 console, but the code you are giving is a Win32 App.

Win32 console uses a main() function for the entry point. Win32 Application uses WinMain() as the entry point.

ebbe
06-07-2002, 11:07 PM
Great!! It works!