Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.1
-
None
-
-
6c2bb05e6 (6.6), 67d845a02 (6.5), 42b0cb7cc (dev), e1382f6ad (dev)
Description
I have a QML application that links two QML libraries that we develop ourselves. The libraries are created with qt_add_library(MyQtQuick STATIC) and qt_add_qml_module(MyQtQuick ...). However the application fails to start, with error:
QQmlApplicationEngine failed to load component ( in ::) qrc:/MyQtQuickCellAna/qml/main.qml:149:9: Type FlickableScene unavailable ( in qrc:/MyQtQuickCellAna/qml/main.qml::) qrc:/MyQtQuickCellAna/qml/FlickableScene.qml:28:1: module "MyQtQuick" plugin "MyQtQuickplugin" not found ( in qrc:/MyQtQuickCellAna/qml/FlickableScene.qml::)
When I remove STATIC from qt_add_library(MyQtQuick STATIC), everything works and the application starts.
The reason why I need to build MyQtQuick static is because it links a number of static libraries that are otherwise duplicate defines in the application.
Some of my specs:
- Qt: Version 6.5.1 built as a shared library, from sources
- Platforms: Linux, Windows
I found possibly related issues:
- https://bugreports.qt.io/browse/QTBUG-82598: Seems slightly related but is closed. Also does not mention cmake.
- https://bugreports.qt.io/browse/QTBUG-87005: Seems related but mentions a different error.
Attachments
Issue Links
- relates to
-
QTBUG-111946 How should QML modules be installed with cmake (with Qt 6.4 or later)?
- Reported
-
QTBUG-93625 qt_internal_add_test doesn't call qt_import_qml_plugins
- Reported