Original Post
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