Unresolved external symbol while trying to use DirectX SDK

Started by
9 comments, last by Benjamin Franklin 11 years, 9 months ago
I am trying to get this game that some friends and I are making to compile with no success. My errors are as follows:

1>dsutil.obj : error LNK2019: unresolved external symbol _DXTraceA@20 referenced in function "public: long __thiscall CSoundManager::Initialize(struct HWND__ *,unsigned long)" (?Initialize@CSoundManager@@QAEJPAUHWND__@@K@Z)
1>.\Debug/paddle_game.exe : fatal error LNK1120: 1 unresolved externals


I am at a loss as to what to do. I added my DirectX include and x86 library files from 3 different versions of the SDK and tried each one individually with no success. I even tried putting my dxerr9.h and .lib into the program folder and nothing. I have been trying everything that I have found on the internet to fix this, and nothing. I am so frustrated with this. Any advice would be greatly appreciated. Thanks in advance.
Advertisement
What IDE are you using? Have you added the library dependencies in the project settings in addition to including headers in the actual code?

Hazard Pay :: FPS/RTS in SharpDX (gathering dust, retained for... historical purposes)
DeviantArt :: Because right-brain needs love too (also pretty neglected these days)

I am using Visual Studio 2008. I don't know how to add the library dependencies. Could you help please?
I just found out where the additional dependencies are and dxerr9 is included in the dependencies, which I heard it where the DXTrace function can be found. This just gets more and more frustrating.
You want to make sure you've set up your include/library paths correctly, see this thread for a related solution (might need some tweaking on the menu titles, but the core concept is the same)

Hazard Pay :: FPS/RTS in SharpDX (gathering dust, retained for... historical purposes)
DeviantArt :: Because right-brain needs love too (also pretty neglected these days)

I did set them up the paths correctly. I don't understand why it won't work.
Would this work?
#pragma comment(lib,"dxerr9.lib")
in your source file
@fredericvo - that didn't work either. i added the #include dxerr9.h in my code and still this same infuriating errors. i even went so far as to uninstall and re-install VS2010 to see if that fixed the errors.
i appreciate the help you guys are trying to give me. thank you.
Could have something to do with the character set your VS project is using (Project settings -> General -> Character Set).

This topic is closed to new replies.

Advertisement