在Mac中构建Qt 5.4错误

building Qt 5.4 errors in Mac

本文关键字:错误 Qt 构建 Mac      更新时间:2023-10-16

当我在mac中构建Qt 5.4时,我遇到了很多这样的错误:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_NSString", referenced from:
      objc-class-ref in libQt5Bootstrap.a(qstring_mac.o)
  "_FSFindFolder", referenced from:
      macLocation(QStandardPaths::StandardLocation, short) in libQt5Bootstrap.a(qstandardpaths_mac.o)

ld:找不到体系结构x86_64的符号clang:crang:error:链接器命令失败,退出代码为1(使用-v查看调用)error:链接程序命令失败,出口代码为1

make[2]: make[2]: *** [../../../bin/rcc] Error 1*** [../../../bin/moc] Error 1
make[1]: *** [sub-rcc-make_first] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [sub-moc-make_first] Error 2
make: *** [sub-src-make_first] Error 2

知道是什么导致了这些错误吗?

感谢您提前提供的帮助。

我在Mac OS 10.9 上构建的新版本Qt 5.4.1也有同样的问题

Mac Build DS浏览器:qt-src-static-5.4.1 jenkis$/configure-prefix$PWD/qtbase-release-static-accessibility-qt zlib-qt libpng-qt lib jpeg-无cups-无sql sqlite-无qml debug-正常示例-正常测试-跳过qtactiveqt-跳过qtenginio-跳过qtl位置-跳过qtmultimedia-跳过qtserialport-跳过qtquick1-跳过qtquickcontrols-跳过qtscript-跳过qtsensors-跳过qtwebkit-跳过qtweb套接字-跳过qtxmlpatterns

然后使用make-j4