NDK build error: “fatal error: stdint.h: No such file or directory” on Mac Os X

旧巷老猫 提交于 2019-12-14 03:52:26

问题


I use the following build command to build OpenH264 project.

make OS=android ARCH=arm64 NDKROOT=~/Library/Android/android-ndk-r10d/ TARGET=android-12

But i got the following error:

/Users/jerikc/Library/Android/android-ndk-r10d/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/lib/gcc/aarch64-linux-android/4.9/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h
 #include_next <limits.h>  /* recurse down to the real one */
                                                             ^
In file included from ./codec/common/inc/typedefs.h:48:0,
                 from ./codec/common/inc/wels_common_defs.h:37,
                 from codec/common/src/common_tables.cpp:33:
/Users/jerikc/Library/Android/android-ndk-r10d/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/lib/gcc/aarch64-linux-android/4.9/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
 # include_next <stdint.h>
                          ^
compilation terminated.

回答1:


You request target platform 12, which does not support arm64. The lowest TARGET for this architecture is android-21.

There is probably some glitch in the script, and we must set the platform twice in the build command:

make OS=android ARCH=arm64 TARGET=android-21 NDKLEVEL=21

Make sure that NDKROOT and PATH are set correctly.



来源:https://stackoverflow.com/questions/33239915/ndk-build-error-fatal-error-stdint-h-no-such-file-or-directory-on-mac-os-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!