SUMMARY qqc2desktopstyleplugin is very hard to static link against. When you static link qml plugins you usually use the cmake qt5_import_qml_plugins(TARGET) command, however for qqc2-desktop-style links against the plugin but fails to compile due to: "Qt5_QmlPlugins_Imports_mediagui.cpp.obj:-1: error: LNK2019: unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_QQc2DesktopStylePlugin(void)" (?qt_static_plugin_QQc2DesktopStylePlugin@@YA?BUQStaticPlugin@@XZ) referenced in function "public: __cdecl StaticQQc2DesktopStylePluginPluginInstance::StaticQQc2DesktopStylePluginPluginInstance(void)" (??0StaticQQc2DesktopStylePluginPluginInstance@@QEAA@XZ)" I suspect this is because qqc2-desktop-style isn't defining something it needs to when building as a static plugin, but I'm not totally sure. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: 10 (available in About System) KDE Frameworks Version: master Qt Version: 5.15 Compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.27.28826 for x64 ADDITIONAL INFORMATION
update: you need to define QT_STATICPLUGIN when building the static plugin, and also add classname QQc2DesktopStylePlugin to qmldir.
So is this effectively fixed for you? Perhaps it just needs to be documented somewhere?
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!