Setup, DXTrace and other fun stuff

Started by
2 comments, last by Focusrite 12 years, 11 months ago
Hey GameDev,
as a first time poster I figured another of those pesky problems could be in order! I recently upgraded to windows 7/VC10 from my ol' buddy XP and getting directX was in order. Everything was installed and a test project was created (Frank Luna's "Hello World!" App), libraries/includes set up et al. (Libraries: d3d9.lib, d3dx9d.lib, dxguid.lib, DxErr.lib, dinput8.lib).

Onwards to compiling were things doesn't exactly go very well - DXTrace is apparently an unresolved external! I've figured this is due to the character set used (Multi-byte) but changing this causes problems elsewhere in the project due to wrong the wrong character set. At some places things can be fixed with that _T macro (when using Unicode) but at some places I can't seem to sort it out without causing new problems and errors. Google was to little help, not many seems to have had this problem.

Thanks in advance
Focusrite

Error 2 error LNK2019: unresolved external symbol _DXTraceA@20 referenced in function "public: virtual void __thiscall D3DApp::initDirect3D(void)" (?initDirect3D@D3DApp@@UAEXXZ) D:\Dokument\Viktor\VC\Projects\Nyctophobia\Nyctophobia\d3dApp.obj
Error 4 error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "public: virtual void __thiscall D3DApp::initDirect3D(void)" (?initDirect3D@D3DApp@@UAEXXZ) D:\Dokument\Viktor\VC\Projects\Nyctophobia\Nyctophobia\d3dApp.obj
Error 5 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) D:\Dokument\Viktor\VC\Projects\Nyctophobia\Nyctophobia\HelloDirect3D.obj
Error 3 error LNK2001: unresolved external symbol _DXTraceA@20 D:\Dokument\Viktor\VC\Projects\Nyctophobia\Nyctophobia\HelloDirect3D.obj
Error 6 error LNK1120: 3 unresolved externals D:\Dokument\Viktor\VC\Projects\Nyctophobia\Debug\Nyctophobia.exe


PS: It's DX9 btw, since the book by Luna is written for 9c (It's the "a shaders approach" edition). Why I really want to get this to work is because the whole book is based on this framwork! (The framework can be read here: http://www.dreaminco...irectx-part-ii/) DS

Edit: Might be worth noting that I've had it up and running previously on XP/VC08.
[size=1][Not related to the company]
Advertisement
~48h bump

It's a friggin' strange error.. really hope someone here might have a clue on what to do
[size=1][Not related to the company]

~48h bump

It's a friggin' strange error.. really hope someone here might have a clue on what to do


I had a similar problem. I just quit using DXTrace and the HR() macro (or whatever its called), because so far I haven't done anything with DX that is complex enough that I would need to know the specific line number that is causing a problem (I tend to add a few lines and test), and if I was (and desperate enough) I would check for every possible hresult for every function that could be an issue. And failing that, there is always PIX. If you can find the issue, more power to you. I'm sure it'll benefit you in the long run, but I'm going through the same book, and the code is so far error free.

Those other unresolved externals look like you haven't linked properly with d3d and d3dx. If you have upgraded your Platform SDK also, in VC under Project menu, select Project Properties. Expand "Configuration" and click "General". Under "Platform Toolset", expand and select "Windows 7.1SDK". That fixed some of my issues. YMMV.

Good luck.
It was a linking error all right.
Bizarrely enough, selecting the same lib directory that was already set up (x86... on an x64 machine) once again did the trick. And it was the same, no typos :blink:

Thanks for the help, finally can get to actually code on this machine!
[size=1][Not related to the company]

This topic is closed to new replies.

Advertisement