Does it work if you use STATIC instead of SHARED? Is the plugin built at the same time as the main application?
On Tue, Feb 14, 2023, 14:44 Konstantin Shegunov <kshegu...@gmail.com> wrote: > Me again. If it matters, the exact diagnostics is as follows: > > On Mon, Feb 13, 2023 at 10:22 AM Konstantin Shegunov <kshegu...@gmail.com> > wrote: > >> `qt_register_pluginXXX` (or something of this sort). >> > > Here's what emscripten reports: > > error: undefined symbol: _Z31qt_static_plugin_XXX_UiPluginv (referenced by > top-level compiled C/C++ code) > warning: Link with `-sLLD_REPORT_UNDEFINED` to get more information on > undefined symbols > warning: To disable errors for undefined symbols use > `-sERROR_ON_UNDEFINED_SYMBOLS=0` > warning: __Z31qt_static_plugin_XXX_UiPluginv may need to be added to > EXPORTED_FUNCTIONS if it arrives from a system library > Error: Aborting compilation due to previous errors > > If I don't use `PLUGIN_TARGET xxx`, instead I get a cmake warning and the > runtime says the plugin can't be loaded: > ---/qtbase/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:2821 (message): > The qml plugin 'xxx-uiplugin' is a dependency of 'xxx', but the link > target it defines (xxx-uiplugin) does not exist in the current scope. > The plugin will not be linked. > Call Stack (most recent call first): > ---/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:640 > (qt6_import_qml_plugins) > ---/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:640 (cmake_language) > ---/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:705 > (_qt_internal_finalize_executable) > ---/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:562:EVAL:1 > (qt6_finalize_target) >
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest