# DirectX Looking For Wrong .dll file

This topic is 3739 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

When I try to run a compiled direct x app, it says that D3DX9.dll was not found. That file does not come with the redistributable package, the dll is in the form of D3DX9_xx.dll. When I change the D3DX9_xx.dll file names to just D3DX9.dll, it runs fine. Does anyone know how to make it use the D3DX9_xx.dll file? I am using Dev-Cpp. Thanks.

##### Share on other sites
Quote:
 Original post by HandCraftedRadioI am using Dev-Cpp. Thanks.

Don't. Use Visual Studio 2008 Express Edition. It's free, and a far better IDE than DevC++. Visual Studio is the only officially supported compiler for the DirectX SDK, too.

##### Share on other sites
I tried to use vc 2005 but I kept getting errors when trying to set it up. But if its the only way then I guess I'll have to figure it out.

##### Share on other sites
Quote:
Original post by Sc4Freak
Quote:
 Original post by HandCraftedRadioI am using Dev-Cpp. Thanks.

Don't. Use Visual Studio 2008 Express Edition. It's free, and a far better IDE than DevC++. Visual Studio is the only officially supported compiler for the DirectX SDK, too.

Indeed, DevC++ is just horrible. Debugging just doesn't work in it, code completion is a joke and it crawls to standstill on any moderately sized project. If you are looking for a DevC++ alternative but don't want to use Visual Studio try Codeblocks. I used to be a big advocate of this IDE myself for a long time- until I tried the VS 2005 that is! [wink]

Quote:
 Original post by HandCraftedRadioI tried to use vc 2005 but I kept getting errors when trying to set it up. But if its the only way then I guess I'll have to figure it out.

What errors are you getting ? Have you downloaded and installed the Microsoft Platform SDK beforehand ? Visual Studio 2005/2008 unfortunately does not come with any of the libraries needed for regular C++ Windows development; you'll need it for doing anything with OpenGL or DirectX. You'll also need to download the DirectX SDK too since you are developing for DirectX.

##### Share on other sites
Quote:
 Original post by HandCraftedRadioWhen I try to run a compiled direct x app, it says that D3DX9.dll was not found. That file does not come with the redistributable package, the dll is in the form of D3DX9_xx.dll. When I change the D3DX9_xx.dll file names to just D3DX9.dll, it runs fine. Does anyone know how to make it use the D3DX9_xx.dll file? I am using Dev-Cpp. Thanks.
d3dx9.dll is the name of a pretty old version of the D3DX DLL. You should be downloading the DirectX redistributable package to correctly set up the D3D DLLs.

##### Share on other sites
The Forum FAQ covers the D3DX redistributables. Create yourself an installer for the optional dependencies you've taken out and you're ready to roll [smile]

hth
Jack

##### Share on other sites
I have been trying to compile with VC2008 but it is not working right. There are many linker errors related to directx but I can't get it to link correctly. I am including all the same libraries that I used before. Here are the errors:

1>Camera.obj : error LNK2019: unresolved external symbol _D3DXVec3TransformCoord@12 referenced in function "public: void __thiscall Camera::Pitch(float)" (?Pitch@Camera@@QAEXM@Z)
1>Camera.obj : error LNK2019: unresolved external symbol _D3DXMatrixRotationAxis@12 referenced in function "public: void __thiscall Camera::Pitch(float)" (?Pitch@Camera@@QAEXM@Z)
1>Camera.obj : error LNK2019: unresolved external symbol _D3DXVec3Normalize@8 referenced in function "public: void __thiscall Camera::Update(void)" (?Update@Camera@@QAEXXZ)
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>dsutil.obj : error LNK2019: unresolved external symbol _DirectSoundCreate8@12 referenced in function "public: long __thiscall CSoundManager::Initialize(struct HWND__ *,unsigned long)" (?Initialize@CSoundManager@@QAEJPAUHWND__@@K@Z)
1>GameEngine.obj : error LNK2019: unresolved external symbol _D3DXCreateFontIndirectA@12 referenced in function "public: void __thiscall GameEngine::Init(struct HINSTANCE__ *,int,int,bool,struct IDirect3DDevice9 * *)" (?Init@GameEngine@@QAEXPAUHINSTANCE__@@HH_NPAPAUIDirect3DDevice9@@@Z)
1>MainFile.obj : error LNK2001: unresolved external symbol _D3DXCreateFontIndirectA@12
1>GameEngine.obj : error LNK2019: unresolved external symbol _D3DXMatrixPerspectiveOffCenterLH@28 referenced in function "public: void __thiscall GameEngine::Init(struct HINSTANCE__ *,int,int,bool,struct IDirect3DDevice9 * *)" (?Init@GameEngine@@QAEXPAUHINSTANCE__@@HH_NPAPAUIDirect3DDevice9@@@Z)
1>GameEngine.obj : error LNK2001: unresolved external symbol _c_dfDIJoystick2
1>GameEngine.obj : error LNK2001: unresolved external symbol _c_dfDIKeyboard
1>GameEngine.obj : error LNK2001: unresolved external symbol _c_dfDIMouse
1>GameEngine.obj : error LNK2019: unresolved external symbol _DirectInput8Create@20 referenced in function "public: void __thiscall GameEngine::Init(struct HINSTANCE__ *,int,int,bool,struct IDirect3DDevice9 * *)" (?Init@GameEngine@@QAEXPAUHINSTANCE__@@HH_NPAPAUIDirect3DDevice9@@@Z)
1>GameEngine.obj : error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "public: void __thiscall GameEngine::Init(struct HINSTANCE__ *,int,int,bool,struct IDirect3DDevice9 * *)" (?Init@GameEngine@@QAEXPAUHINSTANCE__@@HH_NPAPAUIDirect3DDevice9@@@Z)
1>Sprite.obj : error LNK2019: unresolved external symbol _D3DXCreateTextureFromFileExA@56 referenced in function "void __cdecl CreateTexture(class GameEngine *,char const *,struct IDirect3DTexture9 * *)" (?CreateTexture@@YAXPAVGameEngine@@PBDPAPAUIDirect3DTexture9@@@Z)

##### Share on other sites
Add d3dx9.lib to the Additional Dependencies, under Linker in the project properties.
[EDIT] looks like you also need d3d9.lib

##### Share on other sites
I already had both of those included.

##### Share on other sites
Try to insert dependencies in the code

#include <d3d9.h>#include <d3dx9.h>#pragma comment(lib,"d3d9.lib")#pragma comment(lib,"d3dx9.lib")

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 15
• 13
• 9
• 12
• 10
• ### Forum Statistics

• Total Topics
631442
• Total Posts
3000087
×