# Running Dx9 Application on other platforms

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

## Recommended Posts

Hi there, this semester I choosed to learn some game programming. I wrote a little game with DirectX9 (SDK November 2008) and C++. Everything works fine, but I'm unable to run the application on other platforms which has not installed the DX SDK / Visual Studio. I tried a clean Windows XP SP3 with DirectX End-User Runtimes (November 2008)*. What do I need to install, to run my DirectX applications on other systems? I just don't want to install the big DX SDK! * http://www.microsoft.com/downloads/details.aspx?FamilyId=886ACB56-C91A-4A8E-8BB8-9F20F1244A8E&displaylang=en

##### Share on other sites
Quote:
 Original post by blue182Everything works fine, but I'm unable to run the application on other platforms which has not installed the DX SDK / Visual Studio.
What's the exact error you get?

To deploy a DirectX / VS2008 application "properly", you should install the VS2008 and DX9 redistributables as part of your installer. A little less "proper" way to do it is to direct your users to the Microsoft Visual C++ 2008 Redistributable Package (x86) and the DirectX End-User Runtimes (November 2008). Those will install the nessecary DLLs on the users system.

A quick and dirty way of doing it is to statically link to the CRT on Visual Studio (Project settings (Alt+F7) -> Configuration Properties -> C/C++ -> Code Generation, change Runtime Library to "Multi-threaded (/MT)" in your Release configuration), and to give the user your d3dx9_40.dll file to put in their application directory.
Note that this is against the EULA for the DirectX SDK (Redistributing the DLL like that prevents any security problems in it being patched by Windows Update), and you should only do that for testing your app on other machines where you don't want to have to download the whole redist.
Also, statically linking to the CRT gives you a much larger file size, and also means that any security problems in it can't be patched through Windows update. And if you use any DLLs, you can't share any CRT objects between them (E.g. you can't open a file with fopen() in your EXE and pass the FILE* to the DLL).

##### Share on other sites
Are you linking to the debug libraries, perhaps? Or maybe you're using a reference device? What error are you getting?

##### Share on other sites
Quote:

Well, I'm using a german system of Windows, and it's sometimes quite hard to translate the error messages ;) , however, I solved the problem and need to thank you a lot!

Please don't use "M$" here, it just makes you come across as a 12 year old idiot [smile] d3dx9d_40.dll is the debug version of D3DX, you should only be linking to it in debug builds, and not in release builds. In release builds you want to link to d3dx9.lib, not d3dx9d.lib. And again - remember that this isn't a real fix, it's just to get your code working on another PC whose user trusts you (Or is you). If I was to download an app online which came bundled with D3DX DLLs, I'd probably just delete it. If you're going to be sending the app to people other than friends (And even then, if you're sending it to non-tech savvy people), you should really direct the user to the two redist download pages. #### Share this post ##### Link to post ##### Share on other sites Quote:  Original post by Evil StevePlease don't use "M$" here, it just makes you come across as a 12 year old idiot [smile]

Wish I could be 12 again ;)

Quote:
 Original post by Evil Steved3dx9d_40.dll is the debug version of D3DX, you should only be linking to it in debug builds, and not in release builds. In release builds you want to link to d3dx9.lib, not d3dx9d.lib.And again - remember that this isn't a real fix, it's just to get your code working on another PC whose user trusts you (Or is you). If I was to download an app online which came bundled with D3DX DLLs, I'd probably just delete it. If you're going to be sending the app to people other than friends (And even then, if you're sending it to non-tech savvy people), you should really direct the user to the two redist download pages.

You really helped me out!
I linked to d3dx9.dll and now I don't need the debugging libs anymore. Thanks for that advice!