• Advertisement
Sign in to follow this  

Unresolved External Symbol Error

This topic is 3939 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 searched these forums as much as I can, but I haven't found a working solution. I'm using Visual C++ 2005 Express Ed. and I'm trying to run the example code from Frank Luna's Introduction to 3D Game Programming with DirectX 9.0c: A Shader Approach. However, I get the following errors:
------ Build started: Project: DX, Configuration: Debug Win32 ------
Linking...
d3dApp.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "long __stdcall MainWndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?MainWndProc@@YGJPAUHWND__@@IIJ@Z)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__UpdateWindow@4 referenced in function "public: virtual void __thiscall D3DApp::initMainWindow(void)" (?initMainWindow@D3DApp@@UAEXXZ)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function "public: virtual void __thiscall D3DApp::initMainWindow(void)" (?initMainWindow@D3DApp@@UAEXXZ)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function "public: virtual void __thiscall D3DApp::initMainWindow(void)" (?initMainWindow@D3DApp@@UAEXXZ)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__AdjustWindowRect@12 referenced in function "public: virtual void __thiscall D3DApp::initMainWindow(void)" (?initMainWindow@D3DApp@@UAEXXZ)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 referenced in function "public: virtual void __thiscall D3DApp::initMainWindow(void)" (?initMainWindow@D3DApp@@UAEXXZ)
HelloDirect3D.obj : error LNK2001: unresolved external symbol __imp__PostQuitMessage@4
d3dApp.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "public: virtual void __thiscall D3DApp::initMainWindow(void)" (?initMainWindow@D3DApp@@UAEXXZ)
HelloDirect3D.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
dxerr9.lib(dxerr9.obj) : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
d3dApp.obj : error LNK2019: unresolved external symbol __imp__RegisterClassA@4 referenced in function "public: virtual void __thiscall D3DApp::initMainWindow(void)" (?initMainWindow@D3DApp@@UAEXXZ)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__GetStockObject@4 referenced in function "public: virtual void __thiscall D3DApp::initMainWindow(void)" (?initMainWindow@D3DApp@@UAEXXZ)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function "public: virtual void __thiscall D3DApp::initMainWindow(void)" (?initMainWindow@D3DApp@@UAEXXZ)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__LoadIconA@8 referenced in function "public: virtual void __thiscall D3DApp::initMainWindow(void)" (?initMainWindow@D3DApp@@UAEXXZ)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function "public: virtual int __thiscall D3DApp::run(void)" (?run@D3DApp@@UAEHXZ)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function "public: virtual int __thiscall D3DApp::run(void)" (?run@D3DApp@@UAEHXZ)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function "public: virtual int __thiscall D3DApp::run(void)" (?run@D3DApp@@UAEHXZ)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function "public: virtual long __thiscall D3DApp::msgProc(unsigned int,unsigned int,long)" (?msgProc@D3DApp@@UAEJIIJ@Z)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__GetClientRect@8 referenced in function "public: virtual long __thiscall D3DApp::msgProc(unsigned int,unsigned int,long)" (?msgProc@D3DApp@@UAEJIIJ@Z)
HelloDirect3D.obj : error LNK2001: unresolved external symbol __imp__GetClientRect@8
d3dApp.obj : error LNK2019: unresolved external symbol __imp__SetWindowPos@28 referenced in function "public: void __thiscall D3DApp::enableFullScreenMode(bool)" (?enableFullScreenMode@D3DApp@@QAEX_N@Z)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__SetWindowLongA@12 referenced in function "public: void __thiscall D3DApp::enableFullScreenMode(bool)" (?enableFullScreenMode@D3DApp@@QAEX_N@Z)
d3dApp.obj : error LNK2019: unresolved external symbol __imp__GetSystemMetrics@4 referenced in function "public: void __thiscall D3DApp::enableFullScreenMode(bool)" (?enableFullScreenMode@D3DApp@@QAEX_N@Z)
dxerr9.lib(dxerr9.obj) : error LNK2019: unresolved external symbol __imp__MessageBoxW@16 referenced in function _DXTraceW@20
dxerr9.lib(dxerr9.obj) : error LNK2019: unresolved external symbol __imp__GetForegroundWindow@0 referenced in function _DXTraceW@20
C:\Documents and Settings\Kevin\Desktop\Portfolio\C++\DX\Debug\DX.exe : fatal error LNK1120: 21 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Kevin\Desktop\Portfolio\C++\DX\Debug\BuildLog.htm"
DX - 26 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I've posted on Frank's forums, but there is barely anyone active there and it takes forever to get an answer and the answers I get don't work. I'm guessing it's something wrong with my linker, but I'm pretty sure I set it up correctly: my libs Does anyone have any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Yes, I have followed those steps. Thanks for the suggestion though.

Anyone else?

Share this post


Link to post
Share on other sites
Ahh, please help me. I'm getting so frustrated with this! I really want to read on into this book!

Share this post


Link to post
Share on other sites
msdn says DefWindowProc is from: User32.lib

don't see that in your additional dependencies. Did you use the wizard to create your project & did you select Win32 application (or whatever looks about like that)?

Just try adding User32.lib. After that look up any other functions on msdn (http://msdn.microsoft.com) and find the libraries.

-me

Share this post


Link to post
Share on other sites
Thanks Paladine! I didn't know you could look stuff up on MSDN like that. Cool. Thanks again.

Share this post


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

  • Advertisement