我正在嘗試建立克x針,它是為 Linux 設計的,在 OS X 上。該項目:
Linking CXX executable kxstitch.app/Contents/MacOS/kxstitch
Undefined symbols for architecture x86_64:
"QX11Info::display()", referenced from:
Editor::keyPressAlphabet(QKeyEvent*) in Editor.o
建置腳本中的關鍵行是:
cmake -DCMAKE_INSTALL_PREFIX=
kde4-config --prefix
.. && make -j${THREADS}
缺少的符號似乎是 Qt 的一部分。作為透過 MacPorts 安裝 KDE 的一部分,安裝了許多 Qt 相關的軟體包,包括 qt4-mac、qt4-mac-devel 和 qt4-x11。 cmake的輸出包含:
-- Looking for QT_MAC_USE_COCOA
-- Looking for QT_MAC_USE_COCOA - found
-- Found Qt-Version 4.8.2
-- -> QT_QMAKE_EXECUTABLE is /opt/local/bin/qmake
-- -> QT_INCLUDE_DIR is /opt/local/include
-- -> QT_QTCORE_INCLUDE_DIR is /opt/local/include/QtCore
-- -> QT_BINARY_DIR is /opt/local/bin
-- -> QT_LIBRARY_DIR is /opt/local/lib
-- -> QT_PLUGINS_DIR is /opt/local/share/qt4/plugins
-- -> QT_MKSPECS_DIR is /opt/local/share/qt4/mkspecs
對於如何繼續的任何建議,我將不勝感激。
更新:我已經讀過OS X 上 QtGui 函式庫的問題,雖然我不知道如何將解決方案轉換為 CMAKE。