[Qt-interest] moc hates my shared objects?
Andrea Franceschini
therealmorpheu5 at gmail.com
Sat Feb 28 21:22:28 CET 2009
Hello guys, this time I have no weird crashes, no mysterious
segfaults, just a bit of linker voodoo and black magic. And very short
code to show :)
IGestureRecognizer.h -> http://pastebin.com/m5d4f8d11
Glyph.h -> http://pastebin.com/m24c1884b
Glyph.cpp -> http://pastebin.com/m5d5b8d10
I followed that famous tutorial about dynamic loading of C++ objects
(though rearranging a bit the code because I had some weird issue
about multiple definitions on the two extern "C" functions. Everything
compiles fine, except that when my main application tries to load the
external shared object so produced (namely libGlyph.so) it gets this
error:
libGlyph.so: undefined symbol:
_ZN6Doodle18IGestureRecognizer16staticMetaObjectE.
For sake of completeness, here's the list of symbols in the so:
http://pastebin.com/m215feb9f
As you can easily see, that symbol (line 81) is undefined.
The qmake project file is absolutely standard
(http://pastebin.com/m2752727d) and as long as we have pastebin,
here's the complete compilation output so you can see everything in
its crude glory: http://pastebin.com/mf755297 (I'm using Qt Eclipse
Integration, for what it's worth).
Now: what am I missing?
More information about the Qt-interest-old
mailing list