<div>I&#39;ve a very strange problem while trying to compile a the example provided at </div><div><br></div><div><a href="http://www.cmake.org/Wiki/images/2/25/QtTest-Package-Example.zip" target="_blank">http://www.cmake.org/Wiki/images/2/25/QtTest-Package-Example.zip</a></div>

<div><br></div><div>System Informations:</div><div>Mac OSX 10.5.8</div><div><br></div><div>cmake version 2.8.7 installed from latest dmg package available</div><div>Qt 4.8.1 Installed from latest repositories</div><div><br>

</div><div>I issue the following commands in the QtTest-Package example</div><div>cmake .</div><div>make</div><div><br></div><div>I kept the original CMakeLists.txt unmodified but at last stage, the linker can&#39;t find symbols and this is the output:</div>

<div><br></div><div><div>ld warning: in /Library/Frameworks//QtGui.framework/QtGui, file is not of required architecture</div><div>ld warning: in /Library/Frameworks//QtCore.framework/QtCore, file is not of required architecture</div>

<div>Undefined symbols:</div><div>  &quot;QWidget::languageChange()&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::focusInEvent(QFocusEvent*)&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QMainWindow::createPopupMenu()&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::windowActivationChange(bool)&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::QWidget(QWidget*, QFlags&lt;Qt::WindowType&gt;)&quot;, referenced from:</div><div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div>

<div>  &quot;QApplication::QApplication(int&amp;, char**, int)&quot;, referenced from:</div><div>      _main in main.cpp.o</div><div>  &quot;QWidget::inputMethodEvent(QInputMethodEvent*)&quot;, referenced from:</div><div>

      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::paintEvent(QPaintEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QMainWindow::qt_metacall(QMetaObject::Call, int, void**)&quot;, referenced from:</div>

<div>      MainWindow::qt_metacall(QMetaObject::Call, int, void**)in moc_mainwindow.cxx.o</div><div>  &quot;QWidget::mouseMoveEvent(QMouseEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div>

<div>  &quot;QWidget::keyReleaseEvent(QKeyEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QApplication::exec()&quot;, referenced from:</div><div>      _main in main.cpp.o</div>

<div>  &quot;QWidget::macEvent(OpaqueEventHandlerCallRef*, OpaqueEventRef*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QMetaObject::connectSlotsByName(QObject*)&quot;, referenced from:</div>

<div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>  &quot;QWidget::focusOutEvent(QFocusEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>

  &quot;typeinfo for QMainWindow&quot;, referenced from:</div><div>      typeinfo for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QMainWindow::addToolBar(QToolBar*)&quot;, referenced from:</div><div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div>

<div>  &quot;QWidget::dragLeaveEvent(QDragLeaveEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::inputMethodQuery(Qt::InputMethodQuery) const&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::focusNextPrevChild(bool)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::devType() const&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::mouseReleaseEvent(QMouseEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QMainWindow::setMenuBar(QMenuBar*)&quot;, referenced from:</div>

<div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>  &quot;QWidget::dragMoveEvent(QDragMoveEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div>

<div>  &quot;QMenuBar::QMenuBar(QWidget*)&quot;, referenced from:</div><div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>  &quot;QMainWindow::~QMainWindow()&quot;, referenced from:</div>
<div>
      MainWindow::MainWindow(QWidget*)in mainwindow.cpp.o</div><div>      MainWindow::MainWindow(QWidget*)in mainwindow.cpp.o</div><div>      MainWindow::~MainWindow()in mainwindow.cpp.o</div><div>      MainWindow::~MainWindow()in mainwindow.cpp.o</div>

<div>      MainWindow::~MainWindow()in mainwindow.cpp.o</div><div>  &quot;QWidget::styleChange(QStyle&amp;)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::setVisible(bool)&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::hideEvent(QHideEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::fontChange(QFont const&amp;)&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::resizeEvent(QResizeEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QObject::eventFilter(QObject*, QEvent*)&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QMainWindow::contextMenuEvent(QContextMenuEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::resize(QSize const&amp;)&quot;, referenced from:</div>

<div>      QWidget::resize(int, int)in mainwindow.cpp.o</div><div>  &quot;QWidget::paletteChange(QPalette const&amp;)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::minimumSizeHint() const&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QMainWindow::QMainWindow(QWidget*, QFlags&lt;Qt::WindowType&gt;)&quot;, referenced from:</div><div>      MainWindow::MainWindow(QWidget*)in mainwindow.cpp.o</div>

<div>      MainWindow::MainWindow(QWidget*)in mainwindow.cpp.o</div><div>  &quot;QMainWindow::setStatusBar(QStatusBar*)&quot;, referenced from:</div><div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div>

<div>  &quot;QObject::objectName() const&quot;, referenced from:</div><div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>  &quot;QWidget::closeEvent(QCloseEvent*)&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;non-virtual thunk to QWidget::metric(QPaintDevice::PaintDeviceMetric) const&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div>

<div>  &quot;QWidget::paintEngine() const&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QMainWindow::event(QEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div>

<div>  &quot;QWidget::dropEvent(QDropEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::moveEvent(QMoveEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div>

<div>  &quot;QWidget::leaveEvent(QEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::enterEvent(QEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div>

<div>  &quot;non-virtual thunk to QWidget::paintEngine() const&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;non-virtual thunk to QWidget::devType() const&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QString::free(QString::Data*)&quot;, referenced from:</div><div>      QString::~QString()in mainwindow.cpp.o</div><div>  &quot;QWidget::dragEnterEvent(QDragEnterEvent*)&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QMainWindow::qt_metacast(char const*)&quot;, referenced from:</div><div>      MainWindow::qt_metacast(char const*)in moc_mainwindow.cxx.o</div><div>

  &quot;QWidget::heightForWidth(int) const&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QMainWindow::staticMetaObject&quot;, referenced from:</div><div>      MainWindow::staticMetaObject        in moc_mainwindow.cxx.o</div>

<div>  &quot;QWidget::wheelEvent(QWheelEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QObject::setObjectName(QString const&amp;)&quot;, referenced from:</div>

<div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div>

<div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>  &quot;QWidget::mouseDoubleClickEvent(QMouseEvent*)&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::enabledChange(bool)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::tabletEvent(QTabletEvent*)&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QString::fromUtf8(char const*, int)&quot;, referenced from:</div><div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>

      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div>

<div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>  &quot;QWidget::keyPressEvent(QKeyEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>

  &quot;QMainWindow::setCentralWidget(QWidget*)&quot;, referenced from:</div><div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>  &quot;QObject::customEvent(QEvent*)&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::changeEvent(QEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::showEvent(QShowEvent*)&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QObject::disconnectNotify(char const*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QStatusBar::QStatusBar(QWidget*)&quot;, referenced from:</div>

<div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>  &quot;QWidget::mousePressEvent(QMouseEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div>

<div>  &quot;QObject::timerEvent(QTimerEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QApplication::~QApplication()&quot;, referenced from:</div><div>      _main in main.cpp.o</div>

<div>      _main in main.cpp.o</div><div>  &quot;QWidget::setWindowTitle(QString const&amp;)&quot;, referenced from:</div><div>      Ui_MainWindow::retranslateUi(QMainWindow*)        in mainwindow.cpp.o</div><div>  &quot;QCoreApplication::translate(char const*, char const*, char const*, QCoreApplication::Encoding)&quot;, referenced from:</div>

<div>      Ui_MainWindow::retranslateUi(QMainWindow*)        in mainwindow.cpp.o</div><div>  &quot;QWidget::metric(QPaintDevice::PaintDeviceMetric) const&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div>

<div>  &quot;QWidget::sizeHint() const&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QObject::connectNotify(char const*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div>

<div>  &quot;QToolBar::QToolBar(QWidget*)&quot;, referenced from:</div><div>      Ui_MainWindow::setupUi(QMainWindow*)       in mainwindow.cpp.o</div><div>  &quot;QObject::childEvent(QChildEvent*)&quot;, referenced from:</div>

<div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>  &quot;QWidget::actionEvent(QActionEvent*)&quot;, referenced from:</div><div>      vtable for MainWindowin moc_mainwindow.cxx.o</div><div>ld: symbol(s) not found</div>

<div>collect2: ld returned 1 exit status</div><div>make[2]: *** [QtTest.app/Contents/MacOS/QtTest] Error 1</div><div>make[1]: *** [CMakeFiles/QtTest.dir/all] Error 2</div><div>make: *** [all] Error 2</div></div><div><br>
</div>
<div><br></div><div>Trying to build the same example under QtCreator works smoothly, as well in my system as in another Linux box.</div><div><br></div><div>What can be the error here?</div><div><br></div><div>Many thanks in advance</div>