在Mac中构建Qt 5.4错误

当我在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:clang:error:linker命令失败,退出代码1(使用-v查看调用)错误:链接器命令失败,退出代码1(使用 - v看到调用)

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-DSBrowser:qt-src-static-5.4.1 jenkins $ ./configure -prefix $ PWD / qtbase -release -static -accessibility -qt-zlib -qt-libpng -qt-libjpeg -no-cups -no -sql-sqlite -no-qml-debug -nomake示例-nomake测试-skip qtactiveqt -skip qtenginio -skip qtlocation -skip qtmultimedia -skip qtserialport -skip qtquick1 -skip qtquickcontrols -skip qtscript -skip qtsensors -skip qtwebkit -skip qtwebsockets - 跳过qtxmlpatterns

然后使用make -j4

链接地址: http://www.djcxy.com/p/86343.html

上一篇: building Qt 5.4 errors in Mac

下一篇: Xcode C++ :: Duplicate Symbols for Architecture x86