Bug 422400 - qqc2-desktop-style hard to use statically.
Summary: qqc2-desktop-style hard to use statically.
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-qqc2-desktop-style
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-02 23:29 UTC by Charles Barto
Modified: 2021-04-17 04:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Barto 2020-06-02 23:29:22 UTC
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
Comment 1 Charles Barto 2020-06-02 23:40:57 UTC
update:

you need to define QT_STATICPLUGIN when building the static plugin, and also add classname QQc2DesktopStylePlugin to qmldir.
Comment 2 Nate Graham 2021-03-18 17:11:48 UTC
So is this effectively fixed for you? Perhaps it just needs to be documented somewhere?
Comment 3 Bug Janitor Service 2021-04-02 04:33:33 UTC
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!
Comment 4 Bug Janitor Service 2021-04-17 04:33:20 UTC
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!