Jump to content

  • Log In with Google      Sign In   
  • Create Account


DirectX DLL Hell...


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 JohnnyLightwave   Members   -  Reputation: 142

Like
0Likes
Like

Posted 11 July 2011 - 09:22 AM

Hi all,
Can anyone help me?

I've just moved my whole development to a new computer... where the first time I compiled and ran one of my programs, it told me that D3DX9_42.dll was not found. After some googling, I see that Microsoft has dumped this dll in favor of D3DX9_43.dll. I could just grab the dll, but when my end-users install the game on their computer, I do NOT want them to have to take this extra step.

Does anyone know where I can find a copy of D3DX9.lib that links to a version of the dll that Microsoft is still distributing? (It looks like either D3DX9_43.dll or D3DX9_39 are still in the DirectX package).

I've been googling a couple hours here, and all I can find are bogus sites or linkfarms... or links to D3DX9C, which is the one I have that has the bad linking lib.

Thanks in advance!
John

Sponsor:

#2 James Leighe   Members   -  Reputation: 222

Like
0Likes
Like

Posted 11 July 2011 - 09:29 AM

Download and install the latest version of the DirectX SDK and recompile.

Also, make sure you have the latest DirectX installed.

#3 JohnnyLightwave   Members   -  Reputation: 142

Like
0Likes
Like

Posted 11 July 2011 - 09:38 AM

Download and install the latest version of the DirectX SDK and recompile.


My issue is, I have just got a new computer-- this will be the condition that many of my end-users will be in-- pre-installed with the latest directX, but not containing that dll.
I do not want to have to tell them "and don't forget to download an obscure dll, and put it in an obscure place before you can play!" I never had to do that with DirectX7, and it seems I should be able to find a version of d3dx9.lib that links to a dll that Microsoft is still distributing, no?

I want their experience to be "download game, install, play."

No, I don't want to include a DirectX runtime install in my build. There's no reason at all for me to have to do this-- I haven't had to do it in the past, I only have to do it by upgrading the technology? My alternative is going to be to discontinue using d3dx, but then it's probably going to take me an entire day to write a texture loading function.

#4 Martins Mozeiko   Crossbones+   -  Reputation: 1413

Like
1Likes
Like

Posted 11 July 2011 - 10:09 AM

That's the only legal option with newer d3dx libraries - either stop using d3dx, or include redistributable of DirectX in your setup. You can make it very small in size by including only those components you actually use:
http://msdn.microsoft.com/en-us/library/ee416805(v=vs.85).aspx#ID4EYF

You can also instruct Visual Studio to use d3dx dll file with delay loading. In that case you will be able to start application even if the dll file is missing. Then check presence of needed dll file, and display user-friendly message about the proble, if it is not found (Please install latest DirectX redist... from URL: ...).


My alternative is going to be to discontinue using d3dx, but then it's probably going to take me an entire day to write a texture loading function.

If you care only about png/jpg/bmp/tga, then use stb_image.c. That's only one C source file that can load all those formats with one simple function call.

#5 mhagain   Crossbones+   -  Reputation: 7413

Like
0Likes
Like

Posted 11 July 2011 - 11:20 AM

Just use an older DirectX SDK - last time I checked, MS still had SDKs going back to 2005 or so available for download, so grab one of those (you may need to search around a bit on their downloads site to find it) and link against it. Problem solved.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#6 JohnnyLightwave   Members   -  Reputation: 142

Like
0Likes
Like

Posted 11 July 2011 - 11:21 AM

Well... I think I'll try to eradicate D3DX from my code first. I only use it in a few places... mostly for loading textures. I'll get around that.

Thanks for the help!

#7 Flimflam   Members   -  Reputation: 657

Like
1Likes
Like

Posted 11 July 2011 - 02:54 PM

Also consider that if you just direct your users to the DX9 end-user web installer, it'll install the D3DX dlls that are missing from their machine.

#8 Evil Steve   Members   -  Reputation: 1955

Like
0Likes
Like

Posted 12 July 2011 - 05:49 AM

Just use an older DirectX SDK - last time I checked, MS still had SDKs going back to 2005 or so available for download, so grab one of those (you may need to search around a bit on their downloads site to find it) and link against it. Problem solved.

The last SDK that static linked to the D3DX libraries was something like December 2004 (Possibly earlier, but it was definitely December some year). And a version that old won't be compatible with the current SDK, meaning you'll need to change a bunch of code to get it to work, and the older versions have pretty terrible performance and security issues in them.

The best way, the way that everyone else does, is to just bundle the DirectX redistributable with your app. Then it'll install the version of the D3DX libraries you need.

Steve Macpherson
Senior programmer, Firebrand Games


#9 SuperVGA   Members   -  Reputation: 1118

Like
0Likes
Like

Posted 12 July 2011 - 05:52 AM

With GLUT i just link the libraries into my executable statically. -I can imagine that this is a dangerous task with DX, but off the top of my head, that's what I'd take a look at.

#10 Evil Steve   Members   -  Reputation: 1955

Like
1Likes
Like

Posted 12 July 2011 - 06:27 AM

With GLUT i just link the libraries into my executable statically. -I can imagine that this is a dangerous task with DX, but off the top of my head, that's what I'd take a look at.

The D3DX libraries don't have a static version of the library, for security reasons (A DLL can be patched via Windows Update, code linked into an executable can't).

Steve Macpherson
Senior programmer, Firebrand Games





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS