Sign in to follow this  
SulphurTenM

Untitled

Recommended Posts

I am trying to learn some DirectX 9c (my current GPU doesn't support DirectX 10)... However, my Visual Studio projects do not compile. I have followed this PDF to the letter and my project still fails to link properly. PDF: http://www.d3dcoder.net/Data/Book2/Book2Setup.pdf I have double and triple checked that I have added the directories for the DirectX headers and libs (library paths) - as described in the PDF. Also I am 100% positive that the libs are included in the linker for the project (d3d9.lib, d3dx9d.lib, dxguid.lib, DxErr9.lib, dinput8.lib). I am trying to get a simple "Hello World" program working (from chapter 4 in Source Code Part I from http://www.d3dcoder.net/d3d9c.aspx) I am on Windows XP SP3 using Visual Studio 2005 v8.0.5. DirectX 9.0c version: Summer 2004 Compiling in debug (as opposed to release). As the PDF instructs, I started with an Empty Project. Below is the error message, it shows that "_DXTraceA@20" is unresolved (believed to be in DxErr9.lib - which is linked). Also "_Direct3DCreate9@4" is unresolved (believed to be in d3d9.lib - also linked). Any help on the subject would be greatly appreciated. Error Message:
1>Compiling...
1>d3dApp.cpp
1>HelloDirect3D.cpp
1>Generating Code...
1>Compiling manifest to resources...
1>Linking...
1>d3dApp.obj : error LNK2019: unresolved external symbol _DXTraceA@20 referenced in function "public: virtual void __thiscall D3DApp::initDirect3D(void)" (?initDirect3D@D3DApp@@UAEXXZ)
1>HelloDirect3D.obj : error LNK2001: unresolved external symbol _DXTraceA@20
1>d3dApp.obj : error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "public: virtual void __thiscall D3DApp::initDirect3D(void)" (?initDirect3D@D3DApp@@UAEXXZ)
1>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)
1>C:\Documents and Settings\Lewis\My Documents\Visual Studio 2005\Projects\DX9 - Tut00b\Debug\DX9 - Tut00b.exe : fatal error LNK1120: 3 unresolved externals

Share this post


Link to post
Share on other sites
It looks like you are not linking to the DirectX libs. Are you already? If you are not you'll need to add d3d9.lib and d3dx9.lib to the linker options in your project properties.

Edit: I need to L2Read, you already link.

Are the libs in the right place? Have you told VS where to find them?

Share this post


Link to post
Share on other sites
Ok, if anyone else out there is an idiot like me here was the problem:

I had the library path set to [DirectX SDK/Lib/x64].
I'm running a 32bit machine.
No x86 folder is provided (for summer 2004), so just set it to [DirectX SDK/Lib].

Also, sorry about the lack of topic title.

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