views:

84

answers:

2

I have a simple 3D application programmed in C++ and D3D9 using MSVC++ 2008 Express. Some weeks ago, I had to format my hard disk, so the DirectX SDK is not currently installed.

However, I found that the exe file that I found in my "Debug" folder for the project does not run. The error it gives is:

"This application has failed to start because d3dx9d_38.dll was not found. Re-installing the application may fix this problem."

Of course, it worked after I installed the SDK. Then I compiled a "release build" thinking that that was the solution. Then I uninstalled the SDK and tried to run the .exe file. Still gave me the error.

So how does one make such .exe files run on machines without the SDK?

A: 

I think you cannot run the app without the SDK. See XBMC, which requires the SDK to run.

However, you could try simply placing the required dll file from your SDK in the same directory as the executable.

Soumya92
A: 

I followed the solution as stated here.

I copied the d3dx9_38.dll file into my Release folder. It still didn't work. However, I renamed the dll file to "d3dx9d_38.dll. Then it worked. Wondering why I had to rename to the debug version of the file even though it was a RELEASE build... (madarchod v__v)

rambo
huh ? you said in your question it was an exe coming from the debug directory... d3dx9d_38.dll is certainly a debug dll, that you're not allowed to distribute. Build against the release d3d.
Bahbar
You've linked against the debug D3DX DLL. SO you've renamed the release DLL to look like the debug DLL and it works (Thankfully there are no debug only hooks to worry about in there).
Goz
Change the linker settings for your release build to link against the release-mode DirectX library, instead of the debug one.
Alan
Oh yeah. I did that later on. I didn't realize that there were different property pages for debug and release versions.But after doing that, it gave me strange compile errors. Searching on google, I found some articles that state various reasons for that related to compiler optimization process in release builds... hmm...
rambo