Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check for DLL dependency?

Sometimes when I'm doing a little project I'm not careful enough and accidentally add a dependency for a DLL that I am not aware of. When I ship this program to a friend or other people, "it doesn't work" because "some DLL" is missing. This is of course because the program can find the DLL on my system, but not on theirs.

Is there a way to scan an executable for DLL dependencies or execute the program in a "clean" DLL-free environment for testing to prevent these oops situations?

like image 898
orlp Avatar asked Sep 11 '11 14:09

orlp


People also ask

What is DLL dependency?

When a program uses a DLL, an issue that is called dependency may cause the program not to run. When a program uses a DLL, a dependency is created. If another program overwrites and breaks this dependency, the original program may not successfully run.

Do DLLs have dependencies?

When you use depends.exe, be aware that a DLL might have a dependency on another DLL or on a specific version of a DLL. You can use depends.exe on either the development computer or on a target computer. On the development computer, depends.exe reports the DLLs that are required to support an application.

How do I view a DLL in Windows?

You can open the command prompt by going to the Windows Start menu or by holding Windows Key+R and typing "cmd" in the prompt that appears on screen. Open the folder with the DLL file. Once you find the folder, hold the Shift key and right-click the folder to open the command prompt directly in that folder.


1 Answers

dumpbin from Visual Studio tools (VC\bin folder) can help here:

dumpbin /dependents your_dll_file.dll
like image 89
JeffRSon Avatar answered Sep 30 '22 01:09

JeffRSon