QT5.4 Calculator Program Package & release, solve the latest DLL solution (illustrated, very clear)

Source: Internet
Author: User
Tags vc runtime

Qt Writing interface is very good, that is, packaging will be more troublesome, tossing a day is finally packaged and finished.

QT Software Packaging Release a difficult point is the prerequisite DLL file recognition, now the high version of QT comes with a windeployqt tool, directly will need to generate a copy of the DLL, placed in the software directory.

Reference Official Document: Http://doc.qt.io/qt-5/windows-deployment.html#application-dependencies

The following steps are used:

1. Add the QT bin/directory into the system path variable. Very simple, set in the System properties, add D:\QT\QT5.4.1mingw\5.4\mingw491_32\bin; (semicolon cannot be dropped) to the system PATH environment variable (not add environment variable ask Niang)

In the second part, create a new folder in any directory and copy the Calc.exe executable after the compilation is complete. Enter the folder from the command-line mode and execute the statement windeployqt Calc.exe. The tool then parses the program dependencies and automatically adds the necessary DLL files to the directory. The run-time command-line prompts are as follows:

D:\E>WINDEPLOYQT Calc.exed:\e\calc.exe, Release executabadding qt5svg for qsvgicon.dlldirect dependencies: Qt5core Qt5gui qtall dependencies   : Qt5core Qt5gui qtto be deployed     : Qt5core Qt5gui qtupdating Icuin53.dll.Updati ng icuuc53.dll.Updating icudt53.dll.Updating Qt5Core.dll.Updating Qt5Gui.dll.Updating Qt5Svg.dll.Updating Qt5Widgets.dll.Creating directory Iconengines. Updating qsvgicon.dll.Creating directory imageformats. Updating qdds.dll.Updating qgif.dll.Updating qicns.dll.Updating qico.dll.Updating qjp2.dll.Updating Qjpeg.dll.Updating qmng.dll.Updating qsvg.dll.Updating qtga.dll.Updating qtiff.dll.Updating qwbmp.dll.Updating Qwebp.dll.Creating directory platforms. Updating qwindows.dll.Creating qt_ca.qm ... Creating qt_cs.qm ... Creating qt_de.qm ... Creating qt_fi.qm ... Creating qt_hu.qm ... Creating qt_it.qm ... Creating qt_ja.qm ... Creating qt_ru.qm ... Creating qt_sk.qm ... Creating qt_uk.qm ... D:\e>

The necessary library files are automatically added.

2. Generally, there will be less than one or two. dll tested with depends software to see what is missing?

Find the package except Api-ms, and copy it to the root directory of the software in the D:\QT\QT5.4.1mingw\5.4\mingw491_32\bin directory.

3. The first two steps down, the DLL is completely finished, now it's time to pack tool enigmavirtual Box

Specify the *.exe file generated by QT compilation in the "Enter Input file name" column, and automatically generate the path and file name of the packaged output file in the "Enteroutput file name" column. (Please ignore the ads in the middle!) )

Click on the "Add ..." button at the bottom left to add all the dependent link library files, then click "Filesoptions" in the lower right to select "Enable Files Virtualization" and "Compressfiles" in the popup dialog; "OK "Then return to click on" Process "and wait for the little partner to finish the job.

Specify the *.exe file generated by QT compilation in the "Enter Input file name" column, and automatically generate the path and file name of the packaged output file in the "Enteroutput file name" column. (Please ignore the ads in the middle!) )

Click on the "Add ..." button at the bottom left to add all the dependent link library files, then click "Filesoptions" in the lower right to select "Enable Files Virtualization" and "Compressfiles" in the popup dialog; "OK "Then return to click on" Process "and wait for the little partner to finish the job.

So you can succeed.

Qt5.4 mainly relies on the link library description

1.QT Module Library

1

2

3

4

Qt5Core.dll #QT核心库

Qt5Gui.dll #QT GUI Library

Qt5Widgets.dll #QT Widgets Library, the GUI program in QT 5 basically requires this DLL

#还有其他程序用到的Qt5XXX. dll

2.ICU Dependent Libraries

(International Component for Unicode,unicode tool)

1

2

3

Icudt51.dll

Icuin51.dll

Icuuc51.dll

3.QT Plugin Library (new library, path must be correct)

1

2

3

4

5

6

# Depending on the program, different plugin libraries are required

#例如 Qt_dir/plugins/*/*.dll

# You need to keep the file structure of Platforms/*.dll,accessible/*.dll

# put in the directory where you compiled the program

Plugins/platforms/qwindows.dll

Plugins/accessible/qtaccessiblewidgets.dll

4.EGL Dependency Library, providing interfaces for Opengl,opengl ES

1

2

LibEGL.dll

LibGLESv2.dll

5.mingw Dependent libraries (these libraries are not required for MSVC compilation)

1

2

3

Libgcc_s_dw2-1.dll

Libstdc++-6.dll

Libwinpthread-1.dll

6.VC runtime (These libraries are not required for MinGW compilation)

1

2

Msvcr110.dll (corresponds to VS2012)

Msvcp110.dll

Finally send a program, with the program and source code download link: http://pan.baidu.com/s/1dD1y8wh Password: oa9h

Http://www.cnblogs.com/Zengineer/p/4614613.html

QT5.4 Calculator Program Package & release, solve the latest DLL solution (illustrated, very clear)

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.