3

我正在使用 Android NDK 在 Mac 上为 Android 构建 Cocos2d-x 游戏,并且在编译 C++ 部分时收到很多这样的警告:

/usr/include/module.map:1662:22: warning: unknown attribute 'extern_c' [-Wignored-attributes]

危险吗?我该如何解决?

4

1 回答 1

2

我猜测 extern_c 是模块映射的编译器指令,表示它引用了用 C 语言编写的 C++ 函数(不同的调用框架结构)。

CLANG 编译器的 LLVM 部分可能存在版本不匹配。 http://clang.llvm.org/docs/Modules.html#module-maps

试试命令行 $ clang -v

您可能需要验证编译器库版本 xcode->preferences->locations->command line tools。

最终,您将需要清除它,以便您的堆栈帧与参数匹配并且您不引用 C 语言函数。

于 2016-02-02T21:23:51.827 回答