QT编译后,如何手动运行,或复制到其他机器运行
编译后(文件名叫Work.exe),通过QT功能,是可以成功运行的。如果在目录中双击,或复制到其他机器上运行,就会失败。怎么办?
- 打开命令窗口
- 运行命令
D:\Work\build\release>windeployqt Work.exe
D:\WORK\build\release\Work.exe 64 bit, release executable
Adding in plugin type generic for module: Qt6Gui
Adding in plugin type iconengines for module: Qt6Gui
Adding Qt6Svg for qsvgicon.dll from plugin type: iconengines
Adding in plugin type imageformats for module: Qt6Gui
Adding in plugin type networkinformation for module: Qt6Network
Adding in plugin type platforms for module: Qt6Gui
Adding in plugin type sqldrivers for module: Qt6Sql
Adding in plugin type styles for module: Qt6Widgets
Adding in plugin type tls for module: Qt6Network
Direct dependencies: Qt6Core Qt6Gui Qt6Network Qt6Sql Qt6Widgets
All dependencies : Qt6Core Qt6Gui Qt6Network Qt6Sql Qt6Widgets
To be deployed : Qt6Core Qt6Gui Qt6Network Qt6Sql Qt6Svg Qt6Widgets
Warning: Cannot find any version of the dxcompiler.dll and dxil.dll.
Warning: Cannot find Visual Studio installation directory, VCINSTALLDIR is not set.
Qt6Core.dll is up to date.
Qt6Gui.dll is up to date.
Qt6Network.dll is up to date.
Qt6Sql.dll is up to date.
Updating Qt6Svg.dll.
Qt6Widgets.dll is up to date.
Updating opengl32sw.dll.
Updating D3Dcompiler_47.dll.
Creating directory D:/WORK/build/release/generic.
Updating qtuiotouchplugin.dll.
Creating directory D:/WORK/build/release/iconengines.
Updating qsvgicon.dll.
Creating directory D:/WORK/build/release/imageformats.
Updating qgif.dll.
Updating qico.dll.
Updating qjpeg.dll.
Updating qsvg.dll.
Creating directory D:/WORK/build/release/networkinformation.
Updating qnetworklistmanager.dll.
Creating directory D:/WORK/build/release/platforms.
Updating qwindows.dll.
Creating directory D:/WORK/build/release/sqldrivers.
Updating qsqlite.dll.
Updating qsqlmimer.dll.
Updating qsqlmysql.dll.
Updating qsqlodbc.dll.
Updating qsqlpsql.dll.
Creating directory D:/WORK/build/release/styles.
Updating qmodernwindowsstyle.dll.
Creating directory D:/WORK/build/release/tls.
Updating qcertonlybackend.dll.
Updating qopensslbackend.dll.
Updating qschannelbackend.dll.
Creating D:/WORK/build/release\translations...
Creating qt_ar.qm...
Creating qt_bg.qm...
Creating qt_ca.qm...
Creating qt_cs.qm...
Creating qt_da.qm...
Creating qt_de.qm...
Creating qt_en.qm...
Creating qt_es.qm...
Creating qt_fa.qm...
Creating qt_fi.qm...
Creating qt_fr.qm...
Creating qt_gd.qm...
Creating qt_he.qm...
Creating qt_hr.qm...
Creating qt_hu.qm...
Creating qt_it.qm...
Creating qt_ja.qm...
Creating qt_ka.qm...
Creating qt_ko.qm...
Creating qt_lv.qm...
Creating qt_nl.qm...
Creating qt_nn.qm...
Creating qt_pl.qm...
Creating qt_pt_BR.qm...
Creating qt_ru.qm...
Creating qt_sk.qm...
Creating qt_tr.qm...
Creating qt_uk.qm...
Creating qt_zh_CN.qm...
Creating qt_zh_TW.qm...
- 运行
这次成功了。
原文地址:https://blog.csdn.net/quantum7/article/details/142382926
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!