我正在使用qt-everywhere-opensource-src-5.3.0,并尝试在OSX10.10上构建它。 配置完成后,当我运行“make -j”时,出现以下错误:
qcocoamenuloader.mm:177:22:错误:无法初始化类型
的参数'NSInteger'(又名'long'),其右值为'nullptr_t'
[item setTag:nil];
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/MacTypes.h:92:19:note:
expanded from macro '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