Registered Member
|
Hi!
I'm trying to fix this error in my project for more than three days and tried all hints I found on the internet, read the GCC documentation: Nothing helped. The situation is the following: I write a library libfoo-qt which provides Qt4 classes for libfoo to provide Qt4 bindings. Libfoo-qt is linked against libfoo. Then I have another Qt4 lib, (a plugin) which is linked against libfoo-qt => Linking works, but I get an "undefined reference" error if I want to use the plugin. I also link a KDE application against the libfoo-qt library. Linking fails with this reference error:
Does someone know why I experience this error? If don't have any virtual funktion inside of the classes and I haven't set visibility=hidden too. |
KDE Developer
|
Is that "NameSpace::QClass" inheriting directly or indirectly from QObject? If so, did you handle the moc files generation in the build system (which one are you using?) of your library?
Pino Toscano
|
Registered Member
|
The classes inherit directly from QObject:
The build-system (cmake) does this: qt4_automoc(${foo_SRCS}) I do not include any moc-file explicit in source code at time... Hmm... How can I check if the moc files are really built? I do not get any make/cmake messages about building moc files. |
Registered Member
|
I resolved it!
After using qt4_wrap_cpp instead of qt4_automoc the error is gone! Thanks for the hint! |
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]