设为首页 加入收藏

TOP

Qt+VS2015应用程序发布
2017-10-16 18:18:55 】 浏览:8929
Tags:VS2015 应用程序 发布

本文以Qt 5.9.1+VS2015编译环境为例介绍应用程序发布流程,也适用于Qt+mingw的情况。

1. Qt依赖库

  1. 将需要发布的exe(如test.exe),放到单独的目录。
  2. 在“开始菜单”启动Qt 5.9.1 32-bit for Desktop (MSVC 2015),使用cd命令进入第1步中的目录。
  3. 执行windeployqt.exe test.exe --qmldir C:\Qt\Qt5.9.1\5.9.1\msvc2015\qml命令。

    qmldir目录根据Qt版本和visual studio版本不同会步同,使用mingw也类似。

  4. 执行完上面的命令之后,相应的依赖库就会自动拷贝到exe所在的目录。

2. VS2015依赖库

MD版本的程序需要的依赖库如下:

api-ms-win-core-console-l1-1-0.dll
api-ms-win-core-datetime-l1-1-0.dll
api-ms-win-core-debug-l1-1-0.dll
api-ms-win-core-errorhandling-l1-1-0.dll
api-ms-win-core-file-l1-1-0.dll
api-ms-win-core-file-l1-2-0.dll
api-ms-win-core-file-l2-1-0.dll
api-ms-win-core-handle-l1-1-0.dll
api-ms-win-core-heap-l1-1-0.dll
api-ms-win-core-interlocked-l1-1-0.dll
api-ms-win-core-libraryloader-l1-1-0.dll
api-ms-win-core-localization-l1-2-0.dll
api-ms-win-core-memory-l1-1-0.dll
api-ms-win-core-namedpipe-l1-1-0.dll
api-ms-win-core-processenvironment-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-1.dll
api-ms-win-core-profile-l1-1-0.dll
api-ms-win-core-rtlsupport-l1-1-0.dll
api-ms-win-core-string-l1-1-0.dll
api-ms-win-core-synch-l1-1-0.dll
api-ms-win-core-synch-l1-2-0.dll
api-ms-win-core-sysinfo-l1-1-0.dll
api-ms-win-core-timezone-l1-1-0.dll
api-ms-win-core-util-l1-1-0.dll
api-ms-win-crt-conio-l1-1-0.dll
api-ms-win-crt-convert-l1-1-0.dll
api-ms-win-crt-environment-l1-1-0.dll
api-ms-win-crt-filesystem-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-locale-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-multibyte-l1-1-0.dll
api-ms-win-crt-private-l1-1-0.dll
api-ms-win-crt-process-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-time-l1-1-0.dll
api-ms-win-crt-utility-l1-1-0.dll
concrt140.dll
msvcp140.dll
ucrtbase.dll
vcruntime140.dll

在安装了vs2015的电脑上面找到这些文件,拷贝到exe所在的目录即可。 也可以直接从此处下载 VS2015_Release_Library

3. 常见问题

如果提示“应用程序无法正常启动(0xc0000007b)。请单击“确定”关闭应用程序”,是因为缺少依赖库,检查是否遗漏了依赖文件。

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇QT 操作 excel 教程 下一篇hdu 6191--Query on A Tree(持久..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目