[Qt-interest] Undefined symbol error when using singleton class with Qt plugins
Andreas Unger
andi.unger05 at gmail.com
Fri Jan 14 07:13:37 CET 2011
Hi all,
Attached please find a small test project consisting of a singleton class
with two public methods: testString() and printTestString()
The plugin in the project has only one method in its interface:
printTestString();
When Singleton::printTestString is called, TestPlugin::printTestString() is
called in turn. The string that is printed in the plugin is this:
Singleton::instance()->testString()
Could someone please help me figure out why I get this error when I try to
run the code:
./Test: symbol lookup error: libtestplugin.so: undefined symbol:
_ZN9Singleton8instanceEv
It seems likes the symbol relating to the static Singleton::instance()
method is undefined. How could I fix this? I would really appreciate your
input.
Cheers,
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110114/85d4b2a3/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Singleton.zip
Type: application/zip
Size: 3640 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110114/85d4b2a3/attachment.zip
More information about the Qt-interest-old
mailing list