[Development] How to use Q_IMPORT_PLUGIN macro together with *.pri files?

Ryan Chu Ryan.Chu at qt.io
Wed Nov 7 09:47:56 CET 2018


Hi,


If you can share more information (e.g. sample code), it would be easier to figure  out the problem. Before that, have you tried QTPLUGIN for the linking failure?


Best regards,

Ryan


________________________________
From: Development <development-bounces+ryan.chu=qt.io at qt-project.org> on behalf of Denis Shienkov <denis.shienkov at gmail.com>
Sent: Saturday, November 3, 2018 10:48 PM
To: development at qt-project.org; Oswald Buddenhagen; Thiago Macieira
Subject: [Development] How to use Q_IMPORT_PLUGIN macro together with *.pri files?

Hi guys,

I need to create a 'static' plugin for the iOS, using qmake.
A problem is that the qmake can't generate a valid XCode project file, using dependencies.

See, e.g. this bug: https://bugreports.qt.io/browse/QTBUG-71566.
So, I can't use XCode to deliver my application to AppStore.

Instead of using a static plugins I want to include and compile my plugins via
my-plugin.pri files.

But it does not work, because linking failed when I use this code:

...

Q_IMPORT_PLUGIN(MyPlugin)

...

with an error, like:


Undefined symbols for architecture x86_64:

"qt_static_plugin_BasicToolsPlugin()", referenced from:

StaticBasicToolsPluginPluginInstance::StaticBasicToolsPluginPluginInstance() in main.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is any workaround to avoid this and to use a 'static' plugins in a fom of a *.pri files?

BR,
Denis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20181107/10ed972a/attachment.html>


More information about the Development mailing list