Why cant other people run my DirectX9 demo?

Last post 04-02-2008, 6:59 AM by Benn. 21 replies.
Sort Posts: Previous Next
  •  01-14-2008, 1:26 PM

    Why cant other people run my DirectX9 demo?

    Hello everyone, I hope someone can help.

    I have been working on a C++ DirectX9 demo game on-and-off for the last few years, and now that I have it finished I find that the agencies and companies I am sending it to as an example of my work can't run it.

    It says that a directX .dll file is missing and refuses to run. I have asked them if they have the latest directX runtime installed and they have. I have even tried including the dll in the source folder but still no luck.

    Any advice would be greatly appreciated,

    Benn

  •  01-14-2008, 5:37 PM

    Re: Why cant other people run my DirectX9 demo?

    We had simular problems with the Old MDX System, one way to fix it was to include the redist that matches the SDK that you are using inside your installer.

    We found that even though people said they had the latest DX Installed they where only thinking of the DX9c, but as most of the dev guys know sometimes things change in the sdk that are not in the main dx9c release, so either publish the redist package inside your instaler or point them to the current Web Installer for the DX System.


    Glenn "Mykre" Wilson - (XNA / DirectX MVP)
    Virtual Realm :- XNA News and Resources from Down Under
  •  01-15-2008, 12:14 PM

    Re: Why cant other people run my DirectX9 demo?

    I have not yet experimented with the installer software as yet, this problem is occuring when they try to simply run my .exe file. I had a friend update his DX and then try it and he had the same problem. It is really frustrating when I have put a lot of time and effort in for me to be stuck at the final hurdle :(

    Do I need to include the redist files in the folder that my demo.exe is?

    Thanks again

    Benn

  •  01-15-2008, 3:42 PM

    Re: Why cant other people run my DirectX9 demo?

    If your friend has upgraded to the same DX as the SDK you compiled your application against it should be fine. Could you post the exact DLL that the system is erroring out on.
    Glenn "Mykre" Wilson - (XNA / DirectX MVP)
    Virtual Realm :- XNA News and Resources from Down Under
  •  01-30-2008, 4:07 PM

    Re: Why cant other people run my DirectX9 demo?

    The problem as always here is likely that the machines that don't work have not got some of the optional files. You cannot actually answer the questions 'do you have the right DirectX 9 installed' unless you have run the web installer since that makes sure you have ALL the files.

    Installing the SDK just installs the core files and THAT SDKs optional files.

    Using a machine where someone says they have DirectX 9 installed just means they have the core files and possibly some of the optional files.

    So either get them to run the web installer - INSIST ON IT! (folk will ignore you and tell you they don't need to). If it still fails after this then you have screwed something up in your app - missing media or hard coded paths or something.

    -or- follow the SDK instructions and make a proper installer that include the redist for the SDK you are using. If you want to impress with a demo then this is the way to do it anyway. Not understanding how the DX runtime works and sending out non running apps is not a great way to get a job.



    The ZBuffer - News and information for XNA and Managed DirectX
  •  01-31-2008, 9:20 PM

    Re: Why cant other people run my DirectX9 demo?

    The ZMan [MVP/Moderator]:

    So either get them to run the web installer - INSIST ON IT! (folk will ignore you and tell you they don't need to).
    Can't tell you how many times that's happened to me..
  •  02-19-2008, 6:40 PM

    Re: Why cant other people run my DirectX9 demo?

    The x lib dll thing is such a pain.  The last dx game I released I rolled back to when it was statically linked so the game would work on out of the box xp.
  •  02-20-2008, 1:02 PM

    Re: Why cant other people run my DirectX9 demo?

    Thanks for all the replies everyone, it is good to see I am not the only one who has had trouble with this. I think I will take The ZManiacs advice and try to create an installer using MSDN.


  •  02-25-2008, 8:04 PM

    Re: Why cant other people run my DirectX9 demo?

    ZMan's crazy, don't listen to him. :) (hey ZMan, long time no see. still can't get em to put the old forum back. at least kill this one cause its making the main DX9 dev forums look sad with their un-use. ;) ) Anyhow, I had the same problem you had. The problem is that they don't have a specific dx9 dll that gets installed with i'm assuming is the SDK. Goto C:\Windows\System32. Do a "dir d3dx*.dll /s" at the command prompt with cmd.exe. You'll notice a ton of d3dx_##.dll files. Here's my list for reference:

    Microsoft Windows [Version 6.0.6000]
    Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

    C:\Windows\system32>dir d3dx*.dll /s

     Directory of C:\Windows\system32

    11/29/2006  01:06 PM           440,080 d3dx10.dll
    10/02/2007  09:55 AM           487,784 D3DX10d_36.dll
    03/15/2007  04:57 PM           443,752 d3dx10_33.dll
    05/16/2007  04:45 PM           443,752 d3dx10_34.dll
    07/19/2007  06:14 PM           444,776 d3dx10_35.dll
    10/02/2007  09:56 AM           444,776 d3dx10_36.dll
    10/02/2007  09:55 AM         3,799,400 d3dx9d_33.dll
    10/12/2007  03:13 PM         3,896,336 D3DX9d_36.dll
    02/05/2005  07:45 PM         2,222,800 d3dx9_24.dll
    03/18/2005  05:19 PM         2,337,488 d3dx9_25.dll
    05/26/2005  03:34 PM         2,297,552 d3dx9_26.dll
    07/22/2005  07:59 PM         2,319,568 d3dx9_27.dll
    12/05/2005  06:09 PM         2,323,664 d3dx9_28.dll
    02/03/2006  08:43 AM         2,332,368 d3dx9_29.dll
    03/31/2006  12:40 PM         2,388,176 d3dx9_30.dll
    09/28/2006  04:05 PM         2,414,360 d3dx9_31.dll
    11/29/2006  01:06 PM         3,426,072 d3dx9_32.dll
    03/12/2007  04:42 PM         3,495,784 d3dx9_33.dll
    05/16/2007  04:45 PM         3,497,832 d3dx9_34.dll
    07/19/2007  06:14 PM         3,727,720 d3dx9_35.dll
    10/12/2007  03:14 PM         3,734,536 d3dx9_36.dll
    11/02/2006  04:46 AM            53,248 d3dxof.dll
                  22 File(s)     46,971,824 bytes

         Total Files Listed:
                  22 File(s)     46,971,824 bytes
                   0 Dir(s)  39,685,636,096 bytes free

    C:\Windows\system32>

    As you can see, there seems to be a new dll with every SDK revision. A very messy system in my opinion. Ingenious if you want to force developers to spread the DX install to all people. Get them to clean that implementation up if you can ZMan. :) So, just make sure they have the latest d3d9_##.dll you have and put it in the same directory as your executable. That should solve the problem. If not, go with ZMan's advice. Hope that helps.

    ps. beware installers. i've worked with InstallShield, and its good, but do you really want to risk polluting a potential employers machine showing off your elite code if it doesn't go "right" and "breaks" their machine? just something to think about.

     

  •  02-25-2008, 8:21 PM

    Re: Why cant other people run my DirectX9 demo?

    The d3dx files are ONE OF the optional parts of DX that I talked about and though some people dont like the design its very good becuase it measn that for the very changeable parts of dx that change due to game industry requests you dont have to worry about backward compatibility.

    making sure you have the LATEST will not always help. You need to have the one that the developers of the app used...

    Which is why i jsut keep telling people to run the web installer... it will put all the versions on your machine.. mkes it compatbile with all apps. Don't just 'get d3dx' either.. who knows what people have added...

    For reference XACT files and XInput files also have the potential to change each SDK... its only 3 times a year so nothing to worry about.... disk space is cheap.

     



    The ZBuffer - News and information for XNA and Managed DirectX
  •  02-25-2008, 9:11 PM

    Re: Why cant other people run my DirectX9 demo?

    Props to ZMan for burning the midnight oil. I didn't know people on the west coast worked after 5pm. :) Anyhow, ZMan is correct. His method is the safest for 99% of the cases, and I'd go with his advice. My solution is a "quick-fix" method if u just want to quickly show a friend yer demo and yer friend hates installing anything new, DX installer included, on their machine. Even MS people like ourselves have linux-M$-hating friends that don't like to install anything, including the MS OS sometimes. And what better way to convert them by showing them how D3D kicks opengl's a$$.

     

  •  02-25-2008, 9:20 PM

    Re: Why cant other people run my DirectX9 demo?

    MS (and us MVPs) do not condone or support copying random bits of the DX runtimes. It is in fact directly agaisnt the EULA. If you mess up you (or your customers) machine doing this, or you put their machine at a secrity risk becuase MS cannot patch the DLL becuase its in the wrong place then... well its your fault...

    There are just 2 supported methods... the web installer and writing your own installer using the DX SDK official redist. There is NEVER (not even 1%) a good reason to do it any other way. There are many other things that need to be right than just d3dx...

     



    The ZBuffer - News and information for XNA and Managed DirectX
  •  03-02-2008, 2:54 PM

    Re: Why cant other people run my DirectX9 demo?

    Does anyone lnow of a decent tutorial on how to actually create an installer for my code? I am keen to start learning how this end of development works but find the SDK one of the most unhelpful places in the Universe, all the SDK points me to is the redistributables download page :(


  •  03-05-2008, 3:53 AM

    Re: Why cant other people run my DirectX9 demo?

    I tried the web setup option on a friends computer and he still gets the same message...

    Application failed to start because D3DX9D_20.DLL was not found. Try re-installing the application.


  •  03-05-2008, 10:26 AM

    Re: Why cant other people run my DirectX9 demo?

    Thats odd the D in the middle means that somethng is trying to run the Debug versions of the DirectX runtime which ONLY come with the SDK. Has your friend had one or more SDKs on their machine and gone into the DX control panel and turned on debug output? Try looking in the DX cotnrol panel (its in the DX programs NOT inthe regular control panel) and then turning off the debug output.

    The ZBuffer - News and information for XNA and Managed DirectX
  •  03-08-2008, 3:57 PM

    Re: Why cant other people run my DirectX9 demo?

    I have been using the debug mode because when I try to compile and run in release mode it detects a fatal error and says there is no source code availabe for this operation...so I cant debug the release mode.

  •  03-08-2008, 8:21 PM

    Re: Why cant other people run my DirectX9 demo?

    compiling in DEBUG mode != using DirectX debug mode.

    When the DX control panel says 'debug' mode then DX switches in a different set of DLLs to provide extra debug information. Your friend must have that turned on. However since he doesn't have the right SDK installed he doesn't have all the debug DLLs available - they ONLY come with the SDK and you need the correct month SDK, you can't just install any old one. SO it doesn't matter how you compile it - it depends on the setting in the DX control panel.



    The ZBuffer - News and information for XNA and Managed DirectX
  •  03-09-2008, 12:14 PM

    Tongue Tied [:S] Re: Why cant other people run my DirectX9 demo?

    Ok, so it's not because I am sending him the debug version of the exe? Do I not need to send him the release version so the debug DLLs are not called?

    My friend has not had any version of the SDK on his machine at all, just SP2 and the web setup for DX. I am sure he hasnt been into the control panel and changed to debug mode either. Hmmmmn
  •  03-10-2008, 11:10 AM

    Re: Why cant other people run my DirectX9 demo?

    The debug version of yur game should run just fine on his machine. I'm out of ideas - the only thing left would be to use process monitor to see what is being loaded and when on his machine.

    The ZBuffer - News and information for XNA and Managed DirectX
  •  03-23-2008, 6:25 PM

    Re: Why cant other people run my DirectX9 demo?



    I guess the only thing left I can do is to break the demo down to a basic state and then add files and #includes to find out at what stage the error occurs
  •  03-24-2008, 1:35 PM

    Re: Why cant other people run my DirectX9 demo?

    It sounds like you're linking to d3dx9d.lib instead of d3dx9.lib. This is perfectly normal in any debug build, since you probably want to see any errors that come back in the output window of the debugger. But if you want to share it with someone who doesn't have the SDK installed, it won't work unless you link with d3dx9.lib.

  •  04-02-2008, 6:59 AM

    Re: Why cant other people run my DirectX9 demo?

    Thanks for the post John, I changed the library file from d3dx9d.lib to d3dx9.lib and hey presto!! Excellent work.

    This bug has held me up for a few months now and, like I usually find with bug fixing, it all came down to the smallest of changes :)

    Thanks again for all your input on this one fellas!
View as RSS news feed in XML
©2007 Microsoft Corporation. All rights reserved. Privacy Statement Terms of Use Code of Conduct Feedback