gpt4 book ai didi

c++ - Android NDK 错误 : No function renaming possible

转载 作者:太空宇宙 更新时间:2023-11-04 12:15:19 27 4
gpt4 key购买 nike

我已经设法让我的 Android 项目与 Visual Studio 项目一起工作。我遇到的唯一问题是当我编译 c++ 项目时,vsc++ 编译器给我这个错误:

android-ndk-r6b\platforms\android-9\arch-x86\usr\include\sys\cdefs.h(252): fatal error C1189: #error : "No function renaming possible"

如果以前有人遇到过这个问题,任何输入都会很好。

当我将包含 includes 的 .h 包含到这些文件中时,会发生错误

  • jni.h
  • android\log.h

编辑:

我查看了第 252 行附近的 cdefs.h:

245 | #if !defined(_STANDALONE) && !defined(_KERNEL)
246 | #ifdef __GNUC__
247 | #define __RENAME(x) ___RENAME(x)
248 | #else
249 | #ifdef __lint__
250 | #define __RENAME(x) __symbolrename(x)
251 | #else
252 | #error "No function renaming possible"
253 | #endif /* __lint__ */
254 | #endif /* __GNUC__ */
255 | #else /* _STANDALONE || _KERNEL */
256 | #define __RENAME(x) no renaming in kernel or standalone environment
257 | #endif

但老实说,我不确定不重命名...是什么意思。

最佳答案

似乎cdefs.h来自 $(NDKROOT)/.../includes以某种方式与“默认”冲突 cdefs.h来自 Visual Studio。尝试直接访问文件夹 android在您的包含和更改中 #include <android/log.h>#include <log.h>在你的源文件中。

关于 jni.h我没有进一步的线索......

关于c++ - Android NDK 错误 : No function renaming possible,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8000018/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com