我正在使用qt-everywhere-opensource-src-5.3.0,并尝试在OSX10.10上构建它 . 配置完成后,当我运行“make -j”时,我收到以下错误:

qcocoamenuloader.mm:177:22:错误:无法使用'nullptr_t'类型的右值初始化'NSInteger'(又名'long')类型的参数[item setTag:nil];
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/MacTypes.h:92:19:注意:从宏'nil'扩展

#define nil nullptr
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenuItem.h:115:21:注意:传球参数'tag'的参数在这里@property NSInteger标签;生成1个错误 . make [5]:*** [.obj / qcocoamenuloader.o]错误1 make [4]:*** [sub-cocoa-make_first]错误2 make [3]:*** [sub-platforms-make_first]错误2 make [2]:*** [sub-plugins-make_first]错误2 make [1]:*** [sub-src-make_first]错误2 make:*** [module-qtbase-make_first]错误2

对我来说,看起来Mac SDK将nil定义为nullptr,这导致了一个问题 . 有办法解决这个问题吗?

我的配置调用如下所示:

./configure -release -opensource -confirm-license -qt-harfbuzz -qt-zlib -qt-libpng -qt-libjpeg -no-pch -nomake examples -nomake tools -verbose -arch x86_64