Sea*_*udt 5 c++ java java-native-interface android android-ndk
我正在尝试构建NDK兼容代码(可以工作并且已经过测试),但是我在构建过程中遇到以下错误:
[armeabi-v7a] Compile thumb : cpufeatures <= cpu-features.c
/Users/sean/Library/Android/sdk/ndk-bundle/sources/android/cpufeatures/cpu-features.c: In function 'get_elf_hwcap_from_proc_self_auxv':
/Users/sean/Library/Android/sdk/ndk-bundle/sources/android/cpufeatures/cpu-features.c:534:5: warning: implicit declaration of function 'typeof' [-Wimplicit-function-declaration]
int fd = TEMP_FAILURE_RETRY(open(filepath, O_RDONLY));
^
In file included from /Users/sean/Library/Android/sdk/ndk-bundle/platforms/android-14/arch-arm/usr/include/fcntl.h:34:0,
from /Users/sean/Library/Android/sdk/ndk-bundle/sources/android/cpufeatures/cpu-features.c:75:
/Users/sean/Library/Android/sdk/ndk-bundle/platforms/android-14/arch-arm/usr/include/unistd.h:207:18: error: expected ';' before '_rc'
typeof (exp) _rc; \
^
/Users/sean/Library/Android/sdk/ndk-bundle/sources/android/cpufeatures/cpu-features.c:534:14: note: in expansion of macro 'TEMP_FAILURE_RETRY'
int fd = TEMP_FAILURE_RETRY(open(filepath, O_RDONLY));
^
/Users/sean/Library/Android/sdk/ndk-bundle/platforms/android-14/arch-arm/usr/include/unistd.h:209:9: error: '_rc' undeclared (first use in this function)
_rc = (exp); \
^
/Users/sean/Library/Android/sdk/ndk-bundle/sources/android/cpufeatures/cpu-features.c:534:14: note: in expansion of macro 'TEMP_FAILURE_RETRY'
int fd = TEMP_FAILURE_RETRY(open(filepath, O_RDONLY));
^
/Users/sean/Library/Android/sdk/ndk-bundle/platforms/android-14/arch-arm/usr/include/unistd.h:209:9: note: each undeclared identifier is reported only once for each function it appears in
_rc = (exp); \
^
/Users/sean/Library/Android/sdk/ndk-bundle/sources/android/cpufeatures/cpu-features.c:534:14: note: in expansion of macro 'TEMP_FAILURE_RETRY'
int fd = TEMP_FAILURE_RETRY(open(filepath, O_RDONLY));
^
/Users/sean/Library/Android/sdk/ndk-bundle/platforms/android-14/arch-arm/usr/include/unistd.h:207:18: error: expected ';' before '_rc'
typeof (exp) _rc; \
^
/Users/sean/Library/Android/sdk/ndk-bundle/sources/android/cpufeatures/cpu-features.c:544:19: note: in expansion of macro 'TEMP_FAILURE_RETRY'
int ret = TEMP_FAILURE_RETRY(read(fd, (char*)&entry, sizeof entry));
^
make: *** [obj/local/armeabi-v7a/objs/cpufeatures/cpu-features.o] Error 1
Run Code Online (Sandbox Code Playgroud)
我已经尝试将AP_ABI设置为不同的体系结构,但结果大致相同.我的本地开发环境是OSX,我正在使用它直接运行它ndk-clean & ndk-build
还有其他人想出来吗?
| 归档时间: |
|
| 查看次数: |
915 次 |
| 最近记录: |