1

我正在使用 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:注意:

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:注意:

在此处将参数传递给参数“标签”

@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 示例 -nomake 工具 -verbose -arch x86_64

4

0 回答 0