You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a relatively simple qml app which I want to build statically for windows from Linux.
I have a rather default CMakeLists.txt file.
On the internet I found, that I need qt_import_qml_plugins() to import plugins for QML.
Adding this CMake command creates a new file in the build directory with following content:
// This file is autogenerated by CMake. It imports static plugin classes for
// static plugins used by QML imports.
#include <QtPlugin>
Q_IMPORT_PLUGIN(QtQuick2Plugin)
Q_IMPORT_PLUGIN(QtQuick2WindowPlugin)
Q_IMPORT_PLUGIN(QtQuickControls2Plugin)
Q_IMPORT_PLUGIN(QtQmlPlugin)
Q_IMPORT_PLUGIN(QtQuickTemplates2Plugin)
Q_IMPORT_PLUGIN(QtQmlModelsPlugin)
Q_IMPORT_PLUGIN(QtQmlWorkerScriptPlugin)
Q_IMPORT_PLUGIN(QMultimediaDeclarativeModule)
Q_IMPORT_PLUGIN(QtQuickControls2ImagineStylePlugin)
Q_IMPORT_PLUGIN(QtGraphicalEffectsPlugin)
Q_IMPORT_PLUGIN(QtGraphicalEffectsPrivatePlugin)
Q_IMPORT_PLUGIN(QtQuickControls2MaterialStylePlugin)
Q_IMPORT_PLUGIN(QtQuickControls2FusionStylePlugin)
Q_IMPORT_PLUGIN(QtQuickControls2UniversalStylePlugin)
But when I run make I get a wall of undefined reference errors like:
/home/user/git/mxe/usr/bin/i686-w64-mingw32.static-ld: /home/user/git/mxe/usr/i686-w64-mingw32.static/qt5/qml/QtQuick.2/libqtquick2plugin.a(plugin.o):plugin.cpp:(.text$_ZN14QtQuick2Plugin13registerTypesEPKc[__ZN14QtQuick2Plugin13registerTypesEPKc]+0x12): undefined reference to `QQmlWorkerScriptModule::registerQuickTypes()'
/home/user/git/mxe/usr/bin/i686-w64-mingw32.static-ld: /home/user/git/mxe/usr/i686-w64-mingw32.static/qt5/qml/QtQuick.2/libqtquick2plugin.a(plugin.o):plugin.cpp:(.text$_ZThn8_N14QtQuick2Plugin13registerTypesEPKc[__ZThn8_N14QtQuick2Plugin13registerTypesEPKc]+0x12): undefined reference to `QQmlWorkerScriptModule::registerQuickTypes()'
All of them seem to arise from Q_IMPORT_PLUGIN Macro (or whatever it is). What am I doing wrong? Any help much appreciated.
The text was updated successfully, but these errors were encountered:
I have a relatively simple qml app which I want to build statically for windows from Linux.
I have a rather default CMakeLists.txt file.
On the internet I found, that I need qt_import_qml_plugins() to import plugins for QML.
Adding this CMake command creates a new file in the build directory with following content:
But when I run make I get a wall of undefined reference errors like:
All of them seem to arise from Q_IMPORT_PLUGIN Macro (or whatever it is). What am I doing wrong? Any help much appreciated.
The text was updated successfully, but these errors were encountered: