qt5 + Opencv package generated exe files

				版权声明:本文为博主原创文章,未经博主允许不得转载。					https://blog.csdn.net/WLFF_CSDN/article/details/51350524				</div>
							<link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/ck_htmledit_views-f57960eb32.css">
    								            <link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/ck_htmledit_views-f57960eb32.css">
					<div class="htmledit_views" id="content_views">

Programming environment for win7 + QtCreator5.6 + opencv3.0, summary, packaged publications:

The first step: Use windeployqt (transferred from http://tieba.baidu.com/p/3730103947, thank you for sharing)

The official Qt development environment DLL mode used, when publishing exe program generated a lot of need to copy the dll,
if they go to copy the dll, probably forgetful, resulting exe does not work in another computer.
Therefore, the official Qt development environment comes with a tool: windeployqt.exe.
Official Qt 5.4.0 + MinGW development environment, for example,
from the Start Menu - "Qt 5.4.0 -" 5.4 - "MinGW 4.9 (32-bit) -" Qt 5.4 for Desktop (MinGW 4.9 32 bit) , Qt can open a command line, from here you can perform windeployqt tool.
Integrated Development Environment QtCreator currently generate graphical interface program exe can be roughly divided into two categories:
Qt Widgets the Application and Qt Quick Application.
Qt Widgets Application executable publishing
first with QtCreator a new Qt Widgets Application project, the direct use of the default QMainWindow program on it, the project name is assumed to be hellomw.
Then Release compile generate exe program:

After generating the normal operating procedures, find the build directory of the project, such as project source path:
C: \ QtPros \ hellomw \
its project build directory is
C: \ QtPros \ build-hellomw -Desktop_Qt_5_4_0_MinGW_32bit -Release \
into this folder, subfolders into its release inside, find hellomw.exe,
Copy the exe into a new separate folder for publishing, such as saved to 
D: \ hellomw \ folder inside.

Then open the Start menu from the Qt command line, enter the command:
cd / d D: \ hellomw
then use the tool windeployqt command:
windeployqt hellomw.exe

then be in D: \ hellomw folder to see windeployqt tools automatically copy the plugin folder
and dll file, qm file. Exe program to complete this time to get the release of a set of dependencies are resolved well.

D: \ hellomw folder in the qm file is a multi-language translation of documents, do not need can be deleted,
others are reserved.

2. After completing the first step will find the dll files in the program and related dependent opencv not included in, this step is the use of tools hap-depends tools (a few hundred kb of small tools, online download) to view the .exe files rely on all dll file in which to find the dll file with opencv, and then go to the opencv bin folder to find the same file, copied to the first step of the D: \ hellomw folder, so that all depend entirely on the dll file has been a folder.

3. Use the tools Enigma Virtual Box (downloaded from the Internet, the same small) to complete the second step of folders packed to generate the final .exe file.

   knock off! ! !

				版权声明:本文为博主原创文章,未经博主允许不得转载。					https://blog.csdn.net/WLFF_CSDN/article/details/51350524				</div>
							<link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/ck_htmledit_views-f57960eb32.css">
    								            <link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/ck_htmledit_views-f57960eb32.css">
					<div class="htmledit_views" id="content_views">

Guess you like

Origin blog.csdn.net/weixin_43124720/article/details/89914352