Tips for packaging a program under Windows (using Dependency Walker detection is not ideal, switch to VS comes with the dumpbin is foolproof, you can also see the DLL exported functions)

Source: Internet
Author: User

Applications developed under Windows need to be included in the installation package with some of the dynamic link libraries they rely on when publishing. At this point, it is important to quickly determine which dynamic link libraries The program depends on. A long time ago wrote a blog about the QT program installation package, which introduces Dependency Walker , a gadget. But the actual operation is not ideal because Dependency Walker lists all the dynamic libraries that the EXE file relies on and the dynamic libraries that the dynamic libraries depend on. I can see your face:

It's hard to know which DLLs are packaged and which DLLs are brought in by the system. And as a small step in the packaging process, I don't need to know so much information at all. This time, we need a more concise and clear tool. DUMPBIN is the main character to be introduced today.

Second, use

DUMPBIN is published with Visual Studio and can be used directly from the native Tools command line in Visual Studio. The first step to use is to open the "Native Tools command Line" in Visual Studio:

Here I have chosen "VS2015 X64 Native Tools command Prompt". After opening the command Line window, go directly to the project directory, enter the command "dumpbin/imports ReplaceAETemplate.exe > Output.txt":

duang~~~, all dependent DLL entries are saved to output.txt. Open up, look. Output content:

Dependent dynamic Library an item is very clear and unambiguous. Of course, some of the system's dynamic libraries will also be listed. These system dynamic libraries are available when the system is installed, so there is no need to pack them in. Of course, even if packed in, it will not do any harm. This command works with everything to find dependent DLLs, not too cool:

Third, summary

The Imports parameter of dumpbin is used to view other dynamic libraries that are dependent on the program, which is applicable for both executable EXE and dynamic link library DLLs. Exports is useful for DLLs to view their exported function interfaces:

The results were then relocated to the Output.txt. This is because if output is directly on the command line, the preceding content may be truncated, causing the content to look incomplete.

As can be seen from the red box above, UniversalBlender.dll this dynamic link library exported a number of functions: Capabilityassessment, Initializedevice, Runimageblender and so on.

Http://www.cnblogs.com/csuftzzk/p/windows_application_distribution.html

Tips for packaging a program under Windows (using Dependency Walker detection is not ideal, switch to VS comes with the dumpbin is foolproof, you can also see the DLL exported functions)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.