DLL to ship with your application on Windows compiled with Visual Studio 2019 and D3D11/D3D12

Started by
5 comments, last by ddlox 3 years, 6 months ago

Hi everybody,
What is the recommended DLL to ship with your application compiled using Visual Studio 2019 and D3D11/D3D12?
For example D3DCompiler_47.DLL is good to ship with the application?
The best would be to have a list of recommended DLL.
Thanks a lot!

Advertisement

Ok, eigther I'm just really not getting the question, but… the “best” DLLs to ship with your applications are the ones that your application needs to run, and without your user is getting a “missing DLL”-error, no? And thats not something you can make a list of, it depends on what your project uses. Any DLL that you do not explicitely use will have no effect if just placed alongside your application.

Or are you looking for a list of libraries to use? In which case you'd probably need to be a lot more specific.

Ok yes maybe I was not specific enough, I was talking about the DLL that any compiled application using Visual Studio using D3D11 and D3D12 needs, specifically only about Visual Studio en D3D11/D3D12 like D3DCompiler_47.DLL, not about third parties. I ask that because it's always a pain when you give an exe and then a lot of DLL are missing and then it's a pain to find. Redist is one possibility but then your application is not working over the network and administration right can be an issue. It's recommended to have the DLL next to the exe to make sure of the right version and allow it to work on all cases. But the problem is what are the real needed that must be next to the exe to ensure perfect compatibility.

You can gather which DLLs you'll need by using Dependency Walker. It's a free tool. Be patient with it, because it can take some time for it to work its magic.

If you're a power user, you can instead go to the developer's command prompt and run ‘dumpbin /dependents filename.exe'.

Usually, your “users” have DX already installed isn't it?

If you have concerns about certain stuff from an SDK is not present on your target audience's computers, you need to add an installer of the runtime you link against with your app. This is a usual process of shipping whatever you are working on. If you have concerns that those dlls aren't along with your application, keep in mind that Windows will look in different locations for them to load. Those are usually your application location, System32 and whatever is set in the environment variable. An installed DX runtime is also located automatically. Related to DX itself, there won't be any incompatibility along the same DX version, so a DX11 2020 installation is supposed to be the same as DX11 2019.

As computers are managed by their users, unless a smartphone for example, you will always have a few users that can't run your application out of the box. This is the dayly pain of every software developer. The trick is to know your audience and define which platforms and OS you want to support. The more different targets you support, the more you need to design your code to fit into those, for example by #if statements that turn on/off certain platform/OS depending code.

Also as a tipp, Visual Studio will, as far as successfully linked, copy all depending dlls into the output folder. Those not needed to copy are ususally those from the SDK. Kernel32.dll for example has a lib file in the Windows SDK but isn't copied because it is part of Windows already. If your application runs from the output folder, it is very likely that you can ship it to your audience as is

  • if all else fails, download this : http://www.dependencywalker.com/​ (it's microsofts dependency walker as suggested earlier)
  • run it
  • drag and drop your EXE file into and wait (possible for a long time) until when it shows you what DLLs it needs
    (you can also load your EXE via File→Open…etc…)

it sort of looks like this:

in this example, squishqtwrapper.dll needs all those directly under it; squishhook.dll, qtcore4.dll etc… the ones with the yellow question mark are actually missing for this ..wrapper.dll. I'll leave u to work out what the red means as an exercise ?

Until then ?

This topic is closed to new replies.

Advertisement