Jump to content
  • Advertisement
Sign in to follow this  
apswteby

Unresolved External Symbos with VC++ Toolkit 2003

This topic is 5408 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been searching for an answer to this and haven't been able to find anything about it. I got interested in trying some openGL programming and decided to try the first tutorial. I went and downloaded the Visual C++ Toolkit 2003 and the SDK that has the openGL libs. When I try to compile lesson 1 (as downloaded from this site) I get the following errors: Lesson1.obj: error LNK2019: unresolved external symbol __imp__UnregisteredClassA@8 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@YAXXZ) unresolved external symbol __imp__DestroyWindow unresolved external symbol __imp__ReleaseDC unresolved external symbol __imp__MessageBoxA unresolved external symbol __imp__ShowCursor unresolved external symbol __imp__ChangeDisplaySettingsA unresolved external symbol __imp__SetFocus unresolved external symbol __imp__SetForegroundWindow unresolved external symbol __imp__ShowWindow unresolved external symbol __imp__SetPixelFormat unresolved external symbol __imp__ChoosePixelFormat unresolved external symbol __imp__GetDC unresolved external symbol __imp__CreateWindowExA unresolved external symbol __imp__AdjustWindowRectEx unresolved external symbol __imp__RegisterClassA unresolved external symbol __imp__LoadCursorA unresolved external symbol __imp__LoadIconA unresolved external symbol __imp__DefWindowProcA unresolved external symbol __imp__PostQuitMessage unresolved external symbol __imp__SwapBuffers unresolved external symbol __imp__DispatchMessageA unresolved external symbol __imp__TranslateMessage unresolved external symbol __imp__PeekMessageA The rest have a bunch of reference functions like the first one, but I didn't feel like typing them all in. If they would help, let me know and I'll add them. I really appreciate your help guys.

Share this post


Link to post
Share on other sites
Advertisement
Hey mate,

I think this thread will be of help to you. Incidentally, to find that, I actually googled for unresolved external KillGLWindow, which listed that thread as the first result. Just a tip for future reference. [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by hellz
Hey mate,

I think this thread will be of help to you. Incidentally, to find that, I actually googled for unresolved external KillGLWindow, which listed that thread as the first result. Just a tip for future reference. [smile]


Actually, that thread covers VC++ 7, which comes with an IDE. The free VC++ 2003 toolkit is command line only, making things a bit trickier.

Try linking with the following library files:

kernel32.lib user32.lib gdi32.lib winmm.lib opengl32.lib glu32.lib

You probably don't need winmm.lib yet, but you will when you get into timing.

Also, if you have the Windows platform SDK installed, you can use the copy of nmake in the Bin/Win64 directory to build your 32-bit applications using make files (this has made my coding significantly easier).

Hope that helps.

Share this post


Link to post
Share on other sites
Must be that this is the first time I actually heard of someone developing on commandline VS. Can someone inlighten me why this is better? Or is feel and look kind of thing?

Share this post


Link to post
Share on other sites
Quote:
Original post by MikaelBrandin
Must be that this is the first time I actually heard of someone developing on commandline VS. Can someone inlighten me why this is better? Or is feel and look kind of thing?


The command-line VS compilers have one large advantage over the Visual Studio with IDE: they're free. For students who don't want to buy Visual Studio, this is an alternative. Of course, there is also Dev-C++, the free IDE, but it uses gcc instead of the Microsoft compiler. Not that there is anything wrong with gcc (I use it regularly), but if you want to do something Microsoft-specific, the free Microsoft compilers would be a better choice.

Of course, there are always those oddballs who don't like IDEs and prefer command-line development. I used to work with one of those. He would edit the files with vi (vim for Windows in his case), which is a powerful tool when you know all the obscure commands, and then use the Visual C++ command-line compiler to build. It worked for him, and he could do amazing things very quickly with vi.

Share this post


Link to post
Share on other sites
Shi-no-Mitsukai nailed it. Specifically I needed to add in the libraries user32.lib and gdi32.lib, just incase anyone cared. As for why I'm using the Toolkit because it's free (always the best price). I'm also much more used to command line based work. I'm not a diehard VI user, but I have used it a lot, and I'm very comfortable with it. I do a lot of work on embedded systems that don't have fancier editors available, so I guess VI is just a personal preference to me. Thanks for all your help and suggestions. You guys rock!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!