【问题标题】:Qt qml shows error when I use static build当我使用静态构建时,Qt qml 显示错误
【发布时间】:2025-12-12 15:55:02
【问题描述】:

我构建了静态 Qt 5.9.6 并使用此 Qt 版本构建了我的应用程序。但我在 qml 中遇到错误:

QtQml 2.3: QML module does not contain 
informationn about components 
contained in plugins
Qt.labs.platform 1.0: QML module not 
found
QtQuick.Controls 2.2: is not installed
QtQuick.Controls.Styles 1.3: not found

例如,这里有 QtQuick.Controls 1.4,或者 Quick 2.9 也在这里。

这是我的构建脚本:

./configure -static -prefix /usr/lib/qt5.9.6-amd64/qt5 -opensource -confirm-license -nomake tests -nomake examples -no-openssl -qt-doubleconversion -qt-libjpeg -qt-libpng -qt-pcre -qt-xcb -qt-harfbuzz -qt-zlib -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmultimedia -skip qtpurchasing -skip qtqa -skip qtremoteobjects -skip qtrepotools -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttranslations -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview

【问题讨论】:

    标签: linux qt qt5


    【解决方案1】:

    我遇到了同样的错误,当我进一步检查时,我发现应该使用配置中的以下标志禁用 DirectX

    -no-feature-d3d12
    

    【讨论】:

      最近更新 更多