qt mysql VS2015 应用_Qt+VS2015应用程序发布

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

1. Qt依赖库

将需要发布的exe(如test.exe),放到单独的目录。

在“开始菜单”启动Qt 5.9.1 32-bit for Desktop (MSVC 2015),使用cd命令进入第1步中的目录。

执行windeployqt.exe test.exe --qmldir C:\Qt\Qt5.9.1\5.9.1\msvc2015\qml命令。

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

执行完上面的命令之后,相应的依赖库就会自动拷贝到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)。请单击“确定”关闭应用程序”,是因为缺少依赖库,检查是否遗漏了依赖文件。

71f5d9c1f6ecc1cf62a76af9902b59a1.png

支持Windows XP、Server 2003

如果需要支持windows xp和server 2003需要使用Qt 5.6.3及以下版本,并且在visual studio中选择“平台工具集”为"Visual Studio 2015 - Windows XP(v140_xp)"

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值