PDA

View Full Version : Writing a plugin: Can't access symbols from the application



qc
19th February 2010, 18:02
Hi,

I have an application that loads a plugin using QPluginLoader. That just works fine.
Then I made the plugin to be loaded, that also works fine.
But I have to access objects from the application inside the plugin. Once I try to use symbols from the application inside the plugin, I'll get "undefined reference to `symbolname_here'". That should be fine when compiling applications, as all symbols should be resolved when linking. But I want a shared library which should be able to ignore this.

The plugin's .pro settings are:
TEMPLATE=lib
CONFIG+=plugin release

Is there anything I can do to solve this?
Thanks alot.

qc
20th February 2010, 04:26
For some reason, linking under Linux just works fine.
I just get these "undefined reference" errors when linking with MinGW on Windows (Qt 4.6.2 / GCC 4.4.0).