gpt4 book ai didi

c++ - Windeployqt 无法运行, "Access is denied."

转载 作者:行者123 更新时间:2023-11-30 04:43:16 24 4
gpt4 key购买 nike

我正在尝试部署 Qt 应用程序,但每次我尝试运行 windeployqt.exe 时,我都会在 Windows 弹出窗口中收到此错误:

This app can't run on your PC, to find a version for your PC contact the publisher

并且,在终端中:

Access is denied.

这是我的部署脚本,在 VS 2017 Developer CMD 中运行。我没有收到任何其他错误,所以我很确定 qmakenmake 工作正常。

call "C:\Program Files (x86)\Microsoft Visual Studio\...\vcvars64.bat"
call C:\Qt\5.13.1\msvc2017_64\bin\qtenv2.bat
C:\Qt\5.13.1\msvc2017_64\bin\qmake.exe CONFIG+=release [path to .pro]
"C:\Program Files (x86)\Microsoft Visual Studio\...\nmake.exe" [path to Makefile.Release]
copy [path to my qt app executable] [output folder]
cd [output folder]
windeployqt.exe

windeployqt.exe 在我的 PATH 中,但它仍然无法运行。这是我第一次部署 Qt 应用程序,我找不到任何说明在尝试运行 windeployqt.exe 之前我需要执行任何其他操作的文档。我还检查了相关的文件夹权限。我的应用程序的可执行文件是 64 位的,我使用的是 MSVC2017 编译器。如果需要任何其他信息,请告诉我。

最佳答案

重新安装 Qt 解决了这个问题。正如 Azeem 所指出的,windeployqt 的 32 位版本试图使用 64 位二进制文​​件。

关于c++ - Windeployqt 无法运行, "Access is denied.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58363710/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com