Sign in to follow this  
latir

Linker Errors: 2019 From Frank D.Luna [Book 2]

Recommended Posts

latir    122
Hello. I tried to compile a sample program downloaded for the book: Introduction to 3D game programming with directX 9.0c: A Shader Approach. I received the following linker errors: d3dApp.obj : error LNK2019: unresolved external symbol _DXTraceA@20 referenced in function "public: virtual void __thiscall D3DApp::initDirect3D(void)" (?initDirect3D@D3DApp@@UAEXXZ) HelloDirect3D.obj : error LNK2001: unresolved external symbol _DXTraceA@20 d3dApp.obj : error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "public: virtual void __thiscall D3DApp::initDirect3D(void)" (?initDirect3D@D3DApp@@UAEXXZ) HelloDirect3D.obj : error LNK2019: unresolved external symbol _D3DXCreateFontIndirectA@12 referenced in function "public: __thiscall HelloD3DApp::HelloD3DApp(struct HINSTANCE__ *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,enum _D3DDEVTYPE,unsigned long)" (??0HelloD3DApp@@QAE@PAUHINSTANCE__@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4_D3DDEVTYPE@@K@Z) C:\Documents and Settings\Cole-Etti\Desktop\Chapter 4\Hello Direct3D\Debug\Hello Direct3D.exe : fatal error LNK1120: 3 unresolved externals Build log was saved at "file://c:\Documents and Settings\Cole-Etti\Desktop\Chapter 4\Hello Direct3D\Debug\BuildLog.htm" Hello Direct3D - 5 error(s), 0 warning(s) Help Please? :) THANK YOU

Share this post


Link to post
Share on other sites
latir    122
Thanks For The Replies

1.What compiler are you using?
Microsoft Visual Studio 2008 Express Edition

2.Do you have the paths set up correctly?
Yes i have.

3.Did you modify any of the code, or did you leave it the way it was when you downloaded it?
No i took the code exactly how it was, i even wrote out a bit of it, so i could check, and it still didn't work.

and i do have the sdk correctly installed and i have set up it correctly

Share this post


Link to post
Share on other sites
CukyDoh    220
Have you managed to get any DirectX application to compile, including your own?

Are you 100% sure you've included all the correct .libs?

I have that Luna book, and he uses:

d3d9.lib
d3dx9d.lib
dxguid.lib
DxErr9.lib
dinput8.lib
user32.lib
gdi32.lib
kernel32.lib

Share this post


Link to post
Share on other sites
latir    122
yeah i am quite sure

i have these libs:

kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
d3d9.lib
d3dx9d.lib
dxguid.lib
DxErr9.lib
dinput8.lib

Share this post


Link to post
Share on other sites
oliii    2196
hmmm that should link. Try move up the SDK libraries up the list in the lib paths (tools->options->project and solutions->VC++ directories).

Share this post


Link to post
Share on other sites
oliii    2196
1) in the project settings, manually add the directX SDK directories to the linker's additional directories.

2) re-install the DirectX SDK

3) try #pragma comment(lib, "DxErr9.lib"), ... although that would seem really far fetched.

Share this post


Link to post
Share on other sites
latir    122
I've checked the moon labs forums and even put my own post up there and still no help.

i am going to reinstall my SDK as oliii said and see if that worked.

i'll tell you if it did.

NOTE: It didn't work so i am gonna download different DirectX SDK

[Edited by - latir on August 16, 2008 1:53:09 PM]

Share this post


Link to post
Share on other sites
latir    122
Ahh i have solved my problem by downloading a more recent SDK

Thank you everyone for your help :)

Heres the link to the SDK i downloaded if anyone has the same problem:

http://www.softpedia.com/get/System/OS-Enhancements/DirectX-9.0c-Redistributable.shtml

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this