QT Tip: Win7 release QT Program (explained clearly, the EXE and DLL masquerading as a file)

Source: Internet
Author: User
Tags vc runtime

Transferred from: http://www.stardrad.com/blog/qt-5%E7%A8%8B%E5%BA%8F%E5%9C%A8windows%E4%B8%8A%E7%9A%84%E5%8F%91%E5%B8%83/

http://blog.163.com/[email protected]/blog/static/1582209320132291718389/

Recently made a QT program, but the release process is difficult, because QT5 has a lot of DLLs, the following two details the QT DLL dependency library, and how to query the DLL used by the project and the method of packaging publishing.

QT 5 relies on linked libraries to become more, groping for a long time, and review some of the information, summed up the following QT 5 program depends on the library.

I. List of dependent libraries 1. QT Module Library
1234 Qt5Core.dll #QT核心库Qt5Gui. dll #QT GUI library Qt5Widgets.dll #QT Widgets Library, the GUI program in QT 5 basically needs this dll# and other programs Qt5XXX.dll
2.ICU (International Component for Unicode,unicode tool) dependent Library
123 Icudt49.dll Icuin49.dll Icuuc49.dll
3.QT Plugin Library, QT New, a little pit daddy, the path must be correct
123456 # Depending on the program, a different plug-in library is required # For example qt_dir/plugins/*/*.dll# needs to keep Platforms/*.dll,accessible/*.dll's file structure in the same directory as the program you compiled plugins/ Platforms/qwindows.dllplugins/accessible/qtaccessiblewidgets.dll
4.EGL Dependency Library, providing interfaces for Opengl,opengl ES
12 LibEGL.dlllibGLESv2.dll
5.mingw Dependent libraries (these libraries are not required for MSVC compilation)
123 Libgcc_s_sjlj-1.dlllibstdc++-6.dlllibwinpthread-1.dll
6.VC runtime (These libraries are not required for MinGW compilation)
12 Msvcr110.dll (corresponds to VS2012) msvcp110.dll
II. Structure of the document
12345678910111213141516171819202122 --platforms--qwindows.dll--*.dll--accessible--qtaccessiblewidgets.dll--*.dll--(Other plugin fo Lder)--*.dll--yourapp.exe--qt5core.dll--qt5gui.dll--qt5widgets.dll--icudt49.dll--icuin49.dll--icuuc49 . Dll--libegl.dll--libglesv2.dll--libgcc_s_sjlj-1.dll (MinGW)--libstdc++-6.dll (MinGW)--libwinpthread-1.dll (MinGW )--msvcr110.dll (MSVC)--msvcp110.dll (MSVC)
Iii. Summary

To tell the truth, QT 5, although with Icu,open GL Support, there are c++11 support, but because the reliance on the DLL is too much, really a bit inconvenient. A MinGW compiled QT GUI program, just rely on the DLL to have 30-50m dependent library, really very uncomfortable ah. However, 7z compression has about 10M, can also accept

QT static compile link generated exe file, do not rely on the seven elder eight aunt a bunch of DLLs, can run independently, released very convenient. But most use QT open source version, if static link, there are some restrictions. Is there any way to enjoy the convenience of static compilation without the restriction of open source licensing? One way is to use the dynamic compilation, and then the EXE and the required DLLs into a file, the problem is solved.
Specific steps:
First, dynamically compile the link, generate EXE file
Second, find the dependent DLL file
Here, we can use process explore to get the DLL file that we depend on
Download:
http://pan.baidu.com/share/link?shareid=419262&uk=2701984065
Open Procexp.exe, via menu view== "Lower Pane view==" DLLs tick, show DLL window

Here, we take test.exe as an example,
In the QT environment, will EXE run up, in Processexplor, find can find Test.exe, select, see the dependent DLL below.

System directory, generally do not care, sorted by path, look at the QT directory and the MinGW directory, the DLLs are copied out, placed in a single directory.
Three, pack
Packing tool, Enigma Virtual Box is selected here,
Download:
http://pan.baidu.com/share/link?shareid=419263&uk=2701984065
Install, run

Enter Input File name, select EXE
Enter output file name, Output filename
Click the Add button to add the previously prepared DLL file.
Click the files options to select Enable Files virtualization and compress Files,ok
Finally, point process, big Gaocheng.

http://blog.csdn.net/jan5_reyn/article/details/39042175

QT Tip: Win7 release QT Program (explained clearly, the EXE and DLL masquerading as a file)

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.