NDK build error: "fatal error: stdint.h: No such file or directory" on Mac Os X
NDK build error: "fatal error: stdint.h: No such file or directory" on Mac Os X
我使用以下构建命令来构建 OpenH264 项目。
make OS=android ARCH=arm64 NDKROOT=~/Library/Android/android-ndk-r10d/ TARGET=android-12
但我收到以下错误:
/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.
您请求目标平台12,不支持arm64。此架构的最低 TARGET 是 android-21.
脚本中可能存在一些问题,我们必须在构建命令中设置两次平台:
make OS=android ARCH=arm64 TARGET=android-21 NDKLEVEL=21
确保 NDKROOT
和 PATH
设置正确。
我使用以下构建命令来构建 OpenH264 项目。
make OS=android ARCH=arm64 NDKROOT=~/Library/Android/android-ndk-r10d/ TARGET=android-12
但我收到以下错误:
/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.
您请求目标平台12,不支持arm64。此架构的最低 TARGET 是 android-21.
脚本中可能存在一些问题,我们必须在构建命令中设置两次平台:
make OS=android ARCH=arm64 TARGET=android-21 NDKLEVEL=21
确保 NDKROOT
和 PATH
设置正确。