d3dx9_28.dll not found!

Posted on:December 30 2005

Do you like these nice dll-not-found surprises as much as me, when running your self created games on other PCs? Like
The application could not be started, because d3dx9_28.dllwas not found. Reinstalling could remove the problem.
Of course, reinstalling won't change anything. The reason for this is that in 2005, Microsoft has moved the D3DX library from a static linked lib to a dynamic linked dll. Every time they release a new version (almost every two months), they increase the version number and the name of the dll is different (d3dx9_24.dll, d3dx9_25.dll, d3dx9_26.dll, d3dx9_27.dll, ...). The problem now is that end users usually don't update their DirectX version every 2 months. Totally understandable. But usually, developers do, and so the program won't run on the end users system without a DirectX update. Ok, Dlls do have a lot of advantages but in my opinion, Microsoft really made a bad decision here. For example, just search for d3dx9_26.dll and see how many users have a problem with that. Most applications or their installers could provide this dll too, but in fact, most don't do this, and IMO it should also not be their buisness to do that.
Maybe you also have noticed that Irrlicht doesn't suffer from this problem. Why? Because I simply compile Irrlicht with an old SDK version which still has a staticly linkable D3DX version. But this isn't a good solution if you want to use newer versions of the DirectX SDK. How do other 3D engines solve this? Most engines simply don't. They simply won't run without all dlls installed and produce that nice senseless 'resinstall might solve the problem' message box. Others use a plugin-approach: They implement each renderer in an own dll and load it when needed. If for example the d3d renderer doesn't load because the dependency to a d3dx9_xx.dll could not be resolved, they simply don't run with the d3d renderer. But both approaches are not an option for Irrlicht. First because I want Irrlicht to start up always, independent of what the user has installed on his system, and second because I don't want Irrlicht to use plugins, everything should be compiled into one single, small dll.
But this morning, I checked in an Irrlicht version with runs with every version of D3D and independent of what the user has installed on its system. How do I achieve this? Irrlicht now simply tries to load all external dlls manually, like it did this with the standard d3d dlls before too. If you are missing the expected d3dx9_xx.dll, it simply disables the features needed from there, which in this case only is shader support, everything else like mipmap generation is implemented in Irrlicht itself and doesn't rely on D3DX. This also has some other advantages: Irrlicht won't load these unecessary dlls if you don't use their features in your program, increasing startup time a bit. Yay, I really like it now.





Comments:


circumventing m$ features with dll madness, nice to see that
terefang
Quote
2005-12-30 12:39:00


Hmm, but what if the user wants shadersupport and would rather get and error that running without shaders and not knowing what's going on?
Matthias
Quote
2005-12-30 13:44:00


I think that whoever is making a game/renderer with irrlicht should just provide an option to install the latest version of the D3DX dll in the installer for their app. What version of the d3dx9_xx.dll is irrlicht using now anyways?
Andrew
Quote
2005-12-30 21:31:00


I think it depens on what library YOU have installed and have linked with Irrlicht.
bal
Quote
2005-12-31 09:26:00


I think it's always better to make your program run then letting windows abord it with this nice message box. You can check for example the log message or the return code of the shader creation method, and then inform the user displaying a message, whatever you want.
And the precompiled version of Irrlicht is currently using no d3dx9_xx.dll, as mentioned in the text above.
niko
Quote
2005-12-31 17:11:00


sometime in like June, Microsoft realized this problem and made a new installer to install the latest libraries for end users (updating each time they release a new SDK)

I'll see if I can figure out where I put that link.
The Anaconda
Quote
2005-12-31 22:35:00


Add comment:


Posted by:


Enter the missing letter in: "Internationa?"


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons