androidstudio2.3.1 ndk 编译错误error: clang frontend command failed with exit code 70 (use -v to
2017-09-11 16:28
423 查看
问题描述
android ndk编译公司旧代码时出现如下错误: clang.exe: error: clang frontend command failed with exit code 70 (use -v to see invocation)
原因分析&查找
复制出Gradle Console中的所有记录,在sublime中查看
FAILED: D:\Android\sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=mips64el-none-linux-android --gcc-toolchain=D:/Android/sdk/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/windows-x86_64 --sysroot=D:/Android/sdk/ndk-bundle/sysroot -Dzoncare_lib_EXPORTS -isystem D:/Android/sdk/ndk-bundle/sysroot/usr/include/mips64el-linux-android -D__ANDROID_API__=21 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fintegrated-as -Wa,--noexecstack -Wformat -Werror=format-security -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/zoncare-lib.dir/src/main/cpp/ECG_Calcur.c.o -MF CMakeFiles\zoncare-lib.dir\src\main\cpp\ECG_Calcur.c.o.d -o CMakeFiles/zoncare-lib.dir/src/main/cpp/ECG_Calcur.c.o -c D:\Android\PROJECTS\AIO\zoncarediag\mylibrary\src\main\cpp\ECG_Calcur.c fatal error: error in backend: Cannot select: 0x14a66530: ch = store<ST8[%91490](align=4)> 0xd8d3428, 0x5cbc840, 0x10622f50, undef:i64 0x5cbc840: i64,ch = load<LD8[FixedStack-10]> 0x5e65a88, FrameIndex:i64<-10>, undef:i64 0x5cbc568: i64 = FrameIndex<-10> 0x5cbc978: i64 = undef 0x10622f50: i64 = add FrameIndex:i64<1>, Constant:i64<136> 0x10621a30: i64 = FrameIndex<1> 0x10622ee8: i64 = Constant<136> 0x5cbc978: i64 = undef In function: print_refer clang.exe: error: clang frontend command failed with exit code 70 (use -v to see invocation) Android clang version 5.0.300080 (based on LLVM 5.0.300080) Target: mips64el-none-linux-android Thread model: posix
发现提示print_refer函数有问题
查看print_refer函数
void print_refer(struct med_state print_refer_value) { ... }
问题出在此函数的入参上,入参传入了一个大的结构体,导致异常
解决办法
修改入参为结构体指针
void print_refer(struct med_state * print_refer_value) { ... }
原文链接
相关文章推荐
- 多文件开发Import错误导致 clang: error: linker command failed with exit code 1 (use -v to see invocation)
- clang: error: linker command failed with exit code 1 (use -v to see invocation)错误问题
- nodejs错误:ld: library not found for -lgcc_s.10.5 clang: error: linker command failed with exit code 1 (use -v to see invocation)
- "_OBJC_CLASS_$_ALAssetsLibrary", referenced from:和clang: error: linker command failed with exit code 1 (use -v to see invocation)错误
- 解决XCode编译错误clang: error: linker command failed with exit code 1
- xcode编译时候出现clang: error: linker command failed with exit code 1 (use -v to see invocation)的解决方法
- 解决XCode编译错误clang: error: linker command failed with exit code 1
- 解决XCode编译错误clang: error: linker command failed with exit code 1
- 错误 clang: error: linker command failed with exit code 1 (use -v to see invocation)
- iOS--错误集锦--clang error linker command failed with exit code 1 use -v to see invocation
- 错误1_clang: error: linker command failed with exit code 1 (use -v to see invocation)
- shareSDKb编译报错:clang: error: linker command failed with exit code 1 (use -v to see invocation)
- 解决XCode编译错误clang: error: linker command failed with exit code 1
- clang: error: linker command failed with exit code 1 (use -v to see invocation) 无法定位的问题
- ld: library not found for -lAFNetworking clang: error: linker command failed with exit code 1 (use -
- duplicate symbol _OBJC--clang: error: linker command failed with exit code 1 错误
- clang: error: linker command failed with exit code 1 (use -v to see invocation)
- clang: error: linker command failed with exit code 1 (use -v to see invocation)
- clang: error: linker command failed with exit code 1 (use -v to see invocation)
- clang: error: linker command failed with exit code 1 (use -v to see invocation)