[Qt-interest] Extending QT application - some design question
jjDaNiMoTh
jjdanimoth at gmail.com
Tue Oct 6 15:09:05 CEST 2009
Hello to all,
I've read the second part of the plugin how-to [1], where it explains how
expand qt application through plugin. Now I've created my first test app,
with a MainWindow that load some plugins (like the EchoPlugin example).
Now, if I try to define in the MainWindow class a test method ( foo() ) and
try to execute it from plugin, the linker fails, saying the undefined
reference of foo(). I can link togheter the MainWindow.o object file with
the plugin object file, but in this way the plugin architecture doesn't make
sense ( the MainWindow load a plugin that have linked another MainWindow
object file ?!? ).
So, I want to make a plugin that use some already-defined functions, that
live on another part of the program, without linking the plugin itself with
the object that have the already-defined functions.
Is right my design model, or a plugin can't never never call an external
function, but implements only what the MainWindow (in this case) want?
I need to make the already-defined function in a shared library that my
plugin will use? In this case, how I can?
I'm on OSX and I run my application under Linux and OS X.
Many thanks.
[1] http://doc.trolltech.com/4.5/plugins-howto.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091006/1337243f/attachment.html
More information about the Qt-interest-old
mailing list