DirectX Looking For Wrong .dll file
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.
Quote:Original post by HandCraftedRadio
I 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.
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.
Quote:Original post by Sc4FreakQuote:Original post by HandCraftedRadio
I 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 HandCraftedRadio
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.
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.
Quote:Original post by HandCraftedRadiod3dx9.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.
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.
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
hth
Jack
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)
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)
Add d3dx9.lib to the Additional Dependencies, under Linker in the project properties.
[EDIT] looks like you also need d3d9.lib
[EDIT] looks like you also need d3d9.lib
Try to insert dependencies in the code
#include <d3d9.h>#include <d3dx9.h>#pragma comment(lib,"d3d9.lib")#pragma comment(lib,"d3dx9.lib")
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement