🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Newbie question's regarding Lesson 1 and 6 (two solutions)

Started by
9 comments, last by Caste 17 years, 3 months ago
Hi, I've downloaded VC2006 express, the win2003 PSDK, the GL SDK, and I've loaded up Lesson 1. I'm running on winxp sp2 with an athlon 64. I got a bunch of linker errors when i first tried to build so I went into the project propeties to check the libraries were all there. there are the ones I found: opengl32.lib glu32.lib glaux.lib odbc32.lib odbccp32.lib That seemed ok, so I'm kinda stuck now after searching the forum. here's a log of the output: Linking... Lesson1.obj : error LNK2019: unresolved external symbol __imp__UnregisterClassA@8 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ) Lesson1.obj : error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ) Lesson1.obj : error LNK2019: unresolved external symbol __imp__ReleaseDC@8 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ) Lesson1.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ) Lesson1.obj : error LNK2019: unresolved external symbol __imp__ShowCursor@4 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ) Lesson1.obj : error LNK2019: unresolved external symbol __imp__ChangeDisplaySettingsA@8 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ) Lesson1.obj : error LNK2019: unresolved external symbol __imp__SetFocus@4 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z) Lesson1.obj : error LNK2019: unresolved external symbol __imp__SetForegroundWindow@4 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z) Lesson1.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z) Lesson1.obj : error LNK2019: unresolved external symbol __imp__SetPixelFormat@12 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z) Lesson1.obj : error LNK2019: unresolved external symbol __imp__ChoosePixelFormat@8 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z) Lesson1.obj : error LNK2019: unresolved external symbol __imp__GetDC@4 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z) Lesson1.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z) Lesson1.obj : error LNK2019: unresolved external symbol __imp__AdjustWindowRectEx@16 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z) Lesson1.obj : error LNK2019: unresolved external symbol __imp__RegisterClassA@4 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z) Lesson1.obj : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z) Lesson1.obj : error LNK2019: unresolved external symbol __imp__LoadIconA@8 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z) Lesson1.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) Lesson1.obj : error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) Lesson1.obj : error LNK2019: unresolved external symbol __imp__SwapBuffers@4 referenced in function _WinMain@16 Lesson1.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function _WinMain@16 Lesson1.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function _WinMain@16 Lesson1.obj : error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function _WinMain@16 Any help would be great, thanks! [Edited by - spinVector on March 5, 2007 1:16:27 AM]
Advertisement
I'm not at home ATM so I cant check it out but I think you forgot some win32 specific libraries like ole32.lib and others.
Does VC have a project template or wizard for OpenGL? If it does, create one and take a look at the included libs. I'll take a look at it myself when I'm at home again...
Hey Caste could you do what you said you'd do please :) I'm still stuck!

Does anyone recognise those calls? The all loook GL related. weird.

I can't find any openGL templates in the msdn. But remember this project worked when it left NeHe's computers!
Make sure you've installed this:
http://www.microsoft.com/downloads/details.aspx?familyid=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en

Then, follow these instructions:
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/

I myself had to add a few extra dependencies, which are as follows:
opengl32.lib glu32.lib glaux.lib odbc32.lib odbccp32.lib user32.lib gdi32.lib

That should be it. :D
FANTASTIC!

thanks Tsunekuni, those two extra libraries were what was missing.

now i can start having fun :)

So for any noobs like me using MS VisualC 8 express (hey, it's free!), and Nehe Basecode (lesson 1):

Add these two libs: user32.lib gdi32.lib to "additional dependancies" in the Linker->Input branch of your "project properties"
Hello, everyone...

I´m working with the Borland C++ Builder 6.

My problem is the next one, I download the source code from Nehe´s of the lesson number 6 and everything is OK.

But when I try to put it in somewhere else it gives me the next error:

[Linker Error] Unresolved external 'auxDIBImageLoadA' referenced from C:\DOCUMENTS AND SETTINGS\PEPE\ESCRITORIO\OPNGL\TEST\LECCION_06\FILE1.OBJ

I don´t know what to do, I check the options of the project and everything seems to be fine.

I´ll appreciate any help,

Thanks a lot.

Ppone.
Pepone: I Just had that problem too, I found a dirty fix we can use (i've tested it and it's working in MSVC)

go here:

http://www.gamedev.net/community/forums/topic.asp?topic_id=275238

and add the two files to your project and replace the <glaux.h> include with "bmp.h"

thanks to lc_overlord for this :)
Yea, well i just thought i provide the link in my signature.

If it's hard to implement then you could try out our new texture loading code that is in the beta, it's the two neheTGATexture files under lesson05 (which is the new lesson06).

just make a variable
imageTGA m_texture;

load with
m_texture.loadTGA("nehe.tga");

and use with
glBindTexture(GL_TEXTURE_2D,m_texture.getId());

Unfortunately we didn't include lesson06 which has a more or less fully featured texture loading code
Oh, hi overlord. glad to see you're still a regular round here, i think that page i found was 2 years old :)

Thanks for the tip about the new code. Will check it out!

I had a look at the new code (before) and found it quite confusing and overwhelming with all the seperate files and the "up level" common code. After a brief try at getting it to compile I gave up, BUT it looks very elegant and flexible. I can see it being more useful to me when I become a more proficient programmer and know my way around VC a bit better. I'm sure the new tutes will help too.

thanks for all your work, and kudos to everyone working on it.
Yea, yea... GREAT!!!

thanks a lot to spinVector and lc_overlord

I am very grateful for the unit "bmp", it has fixed my problem...

eternally grateful:

P´pone

This topic is closed to new replies.

Advertisement