window发布qt程序

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/leijia_xing/article/details/80336250

1.找到编译路径下的release文件夹,注意这里跟在qtcreator中运行的路径不一样,比如我这里qtcreator运行路径是build-xxx-Desktop_Qt_5_5_1_MinGW_32bit-Release\,但是要拷的文件夹是这个文件夹下的release文件夹,即build-xxx-Desktop_Qt_5_5_1_MinGW_32bit-Release\release,复制到另一个电脑。

2.双击release文件夹里的exe文件,此时会提示缺少dll库,到qt的安装路径下找,比如我这里是C:\Qt\Qt5.5.1\5.5\mingw492_32\bin。全都拷贝到release里。

3.再次双击release文件夹里的exe文件,可能出现如下错误,this application failed to start because it could not find or load the qt platform plugin.到qt安装路径C:\Qt\Qt5.5.1\5.5\mingw492_32\plugins下将platforms拷到release下,此时应该就可以正常运行程序了。

猜你喜欢

转载自blog.csdn.net/leijia_xing/article/details/80336250