[Qt-interest] plugin fails to load with uresolved links to another plugin
Kishore
kitts.mailinglists at gmail.com
Wed Jun 16 13:51:58 CEST 2010
This was originally posted here http://www.cmake.org/pipermail/cmake/2010-
June/037516.html
I am building a plugin based qt application (my first time with plugins) and my
situation, like with many other applications is that plugin A depends on
plugin B. In my application i take care to load plugin B before A. However,
loading plugin A with QPluginLoader fails complaining that it could not
resolve links to API which are in B. plugin B which only depends on the
application API loads fine.
Now, everything works fine if i declare that plugin A depends on B using the
TARGET_LINK_LIBRARIES() (I use the CMake build system) function. But for this
to work, i have to declare both A and B as SHARED instead of MODULE libraries.
What i expect is that since plugin B is already loaded plugin A loads without
error. What am i doing wrong? The Qt example apps do not demonstrate the case
where one plugin calls API of another.
I'm using Qt 4.6.3 on Kubuntu 10.04
--
Cheers!
Kishore
Ps: I also tried declaring an API in the application main code without
implementing it and call this API in plugin B. plugin B still compiles and
loads fine but the application crashes only at the line where the API is
accessed. So my guess is that it is possible to load plugins even if there
effectively are unresolved symbols as long as they are not used, Is that right?
More information about the Qt-interest-old
mailing list