QT 5 compile fails with undefined symbols for x86_64 on OS X
-
I having an issue compiling QT 5.0, where it eventually errors out due to undefined symbols for x86_64.
Undefined symbols for architecture x86_64:
"_XSetErrorHandler", referenced from:
QGtkStylePrivate::initGtkWidgets() const in qgtkstyle_p.o
"_XSetTransientForHint", referenced from:
QGtkStylePrivate::setupGtkFileChooser(_GtkWidget*, QWidget*, QString const&, QString const&, QString*, QFlagsQFileDialog::Option, bool, QHash<_GtkFileFilter*, QString>*) in qgtkstyle_p.o
ld: symbol(s) not found for architecture x86_64Anyone see this before?
Compiling previous versions of QT don't have this issue.
-
Did not get this particular one. Occasionally, though, symbols not found does happen due to Apple's shamefully outdated tools and qmake's archaic macx-xcode specs.
Several things that might help:
- which version of Mac OS, Xcode do you have?
- change the mkspecs to macx-llvm (in configure, that's -platform macx-llvm, in qmake: -spec macx-xcode)
- force Mac to use g++ as linker (Apple's ln is a bit flawed ere and there)
- pass -no-gtkstyle to configure