what do you think these errors mean?

Started by
15 comments, last by donjonson 19 years ago
I am using vc++ 2005 express beta2 and I am getting the following errors what could they mean?

Linking...
dxgraphics.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "int __cdecl Init_Direct3D(struct HWND__ *,int,int,int)" (?Init_Direct3D@@YAHPAUHWND__@@HHH@Z)
winmain.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
game.obj : error LNK2019: unresolved external symbol __imp__PostMessageA@16 referenced in function "void __cdecl Game_Run(struct HWND__ *)" (?Game_Run@@YAXPAUHWND__@@@Z)
game.obj : error LNK2019: unresolved external symbol __imp__GetAsyncKeyState@4 referenced in function "void __cdecl Game_Run(struct HWND__ *)" (?Game_Run@@YAXPAUHWND__@@@Z)
winmain.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "long __stdcall WinProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WinProc@@YGJPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 referenced in function "long __stdcall WinProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WinProc@@YGJPAUHWND__@@IIJ@Z)
winmain.obj : error LNK2019: unresolved external symbol __imp__RegisterClassExA@4 referenced in function "unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@YAGPAUHINSTANCE__@@@Z)
winmain.obj : error LNK2019: unresolved external symbol __imp__GetStockObject@4 referenced in function "unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@YAGPAUHINSTANCE__@@@Z)
winmain.obj : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function "unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@YAGPAUHINSTANCE__@@@Z)
winmain.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function _WinMain@16
winmain.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function _WinMain@16
winmain.obj : error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function _WinMain@16
winmain.obj : error LNK2019: unresolved external symbol __imp__UpdateWindow@4 referenced in function _WinMain@16
winmain.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function _WinMain@16
winmain.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function _WinMain@16
.\Debug/trans_sprite.exe : fatal error LNK1120: 14 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Mark Whittaker\Desktop\trans_sprite\Debug\BuildLog.htm"
trans_sprite - 16 error(s), 0 warning(s)

These tears..leave scars...as they run down my face.
Advertisement
I'm guessing that you haven't linked with user32.lib.
it is linked
These tears..leave scars...as they run down my face.
It means that those functions are called from your code, but they don't exist. Usually, these kind of errors are caused by forgetting to add a library to your project. However, these are standard Win32 functions and are normally included by the standard setup, so you probably set up the project incorrectly, ... or something more difficult to figure out.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
Quote:Original post by donjonson
it is linked


Must be some other windows lib then.

Unless you forgot to include a header or something...
you sure you project is not a console project?
Quote:Original post by chad_420
you sure you project is not a console project?


That doesn't have much effect on compiling Win progs as far as I know, it just opens up a console window along with the main window during the execution. At least, that's what Dev-C++ does, and I'm pretty sure VC++ does that as well.
You must have forgotten to link a library. You can seek the neccessary libraries in MSDN for all those functions (try one at a time, as more functions are probably in the same library).

Crafter 2D: the open source 2D game framework

?Github: https://github.com/crafter2d/crafter2d
Twitter: [twitter]crafter_2d[/twitter]

well I am sure i did something wrong with the librarys. I will tell you how I set it up and perhaps you could see if I have done something wrong.

I got VC++ 2005 express beta 2, which does not come with the windows platform sdk. So I downloaded the Installed the Windows XP SP2 Platform SDK. Since I have a beta versions of vC++, I am unable to link librarys so i just copied all of the librarys from that sdk to the lib directory in visual c++ and the same with the headders. it seems that all of the proper libs are in that directory but I still get the errors.

These tears..leave scars...as they run down my face.
anyone have any ideas?
These tears..leave scars...as they run down my face.

This topic is closed to new replies.

Advertisement