0

我的应用是基于 Qt Quick Controls 2 的应用。Qt 5.7.1、Windows 10、Visual Studio 2015。

桌面 32 位版本工作正常。

但是当我切换到通用 Windows 平台 32 位套件的 Qt 5.7.1 时,它无法运行并出现以下错误:

winrtrunner --device 0 --start --stop --install --wait 0 --profile appx C:/Work/Source/build-MusicPlayer-Qt_5_7_1_for_Universal_Windows_Platform_32bit-Release/bin/player.exe
qt.winrtrunner: Using the Appx profile.
qt.winrtrunner: Failed to activate application: 0x8027025b "The app didn't start."
Error while executing the WinRT Runner Tool: Process crashed

在这里声明缺少一些依赖项。我已经使用 Dependency Walker 检查了它,似乎所有必需的 DLL 都在应用程序的文件夹中。我还尝试将 Qt 工具包安装中的所有文件复制到应用程序的目录中。

我的应用程序由一个主要可执行文件和三个 .DLL 文件组成。我已经为他们每个人启动了windeployqt。尝试了调试和发布版本。

4

2 回答 2

1

我在 Windows 10、Qt 5.8(也是 5.7)、Windows Runtime 64bit VC2015 上遇到了同样的问题。

该主题已在 Qt 网站上打开:https ://forum.qt.io/topic/73272/qt-5-7-for-winrt-and-dynamic-libraries ,但对我来说没有帮助:(。我在这里开了一个新话题:https ://forum.qt.io/topic/75424/cannot-start-qt-quick-winrt-application

于 2017-01-24T08:23:11.207 回答
0

我有同样的问题。

您需要重新编译应用程序用于 Windows 10 SDK 的所有静态/动态库。问题是您需要使用提供沙盒环境的 WinRT dll 而不是“普通”Windows 库。Windows 应用商店应用程序需要这样做。

在我的例子中,我使用 zip 静态库 (zlibstat.lib) 和 Quazip 静态库 (quazip.lib),在 Windows 7 中使用 Visual Studio 2012 编译。

相反,我使用了 Qt zip,因为 Qt 在 QtCore.dll 中提供了 zip 库(只需使用 #include 而不是 #include "zlib.h")并将 Quazip 重新编译为 Windows 10 SDK 的静态库。

于 2017-05-03T22:27:26.790 回答