Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved] Undefined references after compile
I compiled 4.8.5 and I didn't get any errors yet when I try to compile my program I get these undefined reference errors. Where did I go wrong on my compile? Did these get left out during compile? I don't know how.
@/usr/local/Trolltech/Qt-4.8.5/lib/libQtDBus.so.4: undefined reference to
QMutex::unlockInternal()' ../../libs/libmythui/libmythui-0.27.so: undefined reference toQImage::fill(Qt::GlobalColor)'
/usr/local/Trolltech/Qt-4.8.5/lib/libQtDBus.so.4: undefined reference to
QMutex::lockInternal()' /usr/local/Trolltech/Qt-4.8.5/lib/libQtWebKit.so.4: undefined reference toQPainter::clipBoundingRect() const'
../../libs/libmyth/libmyth-0.27.so: undefined reference to
QRadioButton::minimumSizeHint() const' /var/lib/mythtv/compile/myth27/mythtv/mythtv/external/nzmqt/src/libmythnzmqt.so: undefined reference toQCoreApplication::QCoreApplication(int&, char**, int)'@
leon.anavi last edited by
Seems like an issue with paths. Could you please provide more information about your environment and the pro file?
Thanks for the help. I'm running 10.04 64 bit. I compiled 4.7 last night and it works without issue. I will try compiling 4.8.0 and see what happens as I just can't get 4.8.5 to work without the errors above. Maybe trying on 10.04 just won't work for 4.8 and above.
I compiled 4.8.0 and I received the same error as 4.8.5. Either I'm missing something or it just won't work on 10.04. Maybe I'll need to upgrade to 12.04. It generates many pro files. Is there a specific one?
-I think my cmake version is too old which is causing linking problems. I'm using 2.8.1 and from my research I need 2.8.3 or newer. I may try to compile a newer version of cmake and then try qt again.- I'm using make so this statement won't help
I thought you could have two versions of Qt on the same OS. Unfortunately, this wasn't the case. I removed the previous version packages and then recompiled and then installed. Now my other program compiles without undefined references.