解决错误clang: error: linker command failed with exit code 1 (use -v to see invocation)
Posted super_man_风清扬
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决错误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)
$(inherited) 就是all_load
Xcode-Build Settings中,Other Linker Flags 设置加上 -ObjC,假如,这里面配置有all_load,记得一定要删除这个加上-ObjC,
总结一下这个可能存在的原因:
1、工程中文件名重复、重复引入头文件(用 cocoapods 的时候有可能造成重复);
2、.a 文件重复或者缺失(用 SVN 时候有可能导致缺失);
3、Other Linker Flags 下的属性改为 -all_load (或者下边的属性都删除);(在TARGETS --> Build Setting --> Other Linker Flags)
4、Build Setting --> Enable Bitcode 设置为 No;
5、Build Setting --> Architectures --> Build Active Architecture Only 把 Yes 改为 No
以上是关于解决错误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
如何修复错误“clang: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)”?
Cordova XCode app build clang error linker command failed on Launch Navigator
在mac上用Xcode写程序, run的时候总是失败, 显示clang: error: linker command failed with exit code 1
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Xcode真机报错clang: error: linker command failed with exit code 1 (use -v to see invocation)