Jump to content
  • Advertisement
Sign in to follow this  
latir

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

This topic is 3628 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

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
Advertisement
It looks like you're not linking with the DirectX libraries. Do you have the SDK installed? Is the compiler set up correctly to use it?

Share this post


Link to post
Share on other sites
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
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
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
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
yeah it was already at the top of the lib paths,

ahh this problem is really irritating, i just want to carry on in the book

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!