linker command failed with exit code 1 (use -v to see invocation)解决方法
2014-01-02 14:59
597 查看
编译运行代码时出现如下问题:
在网上如果搜“Undefined symbols for architecture i386:”或“clang: error: linker command failed with exit code 1 (use -v to
see invocation)”可以找出大量的讲解决方案的文章,基本上导致以上错误的原因便是“没有导入相关代码文件或者库文件”,网上大部分的文章基本会说缺什么就导入什么,不免说的有些笼统,所以浣熊决定拿一个具体错误给大家演示如何根据错误提示信息解决问题:
1、信息中出现“_SecCertificateCreateWithData”,说其是undefined symbols,所以在目录搜索框中搜寻其在工程中的具体位置:
2、找到具体位置后,按住“command”点击方法继续跟踪,直到其声明根源文件:
由上图可以很清晰的看到,对该方法的声明在系统框架的Security库中
3、在Build Phases → Link Binary With Libraries中添加Security库:
重新编译运行,问题解决。
在网上如果搜“Undefined symbols for architecture i386:”或“clang: error: linker command failed with exit code 1 (use -v to
see invocation)”可以找出大量的讲解决方案的文章,基本上导致以上错误的原因便是“没有导入相关代码文件或者库文件”,网上大部分的文章基本会说缺什么就导入什么,不免说的有些笼统,所以浣熊决定拿一个具体错误给大家演示如何根据错误提示信息解决问题:
1、信息中出现“_SecCertificateCreateWithData”,说其是undefined symbols,所以在目录搜索框中搜寻其在工程中的具体位置:
2、找到具体位置后,按住“command”点击方法继续跟踪,直到其声明根源文件:
由上图可以很清晰的看到,对该方法的声明在系统框架的Security库中
3、在Build Phases → Link Binary With Libraries中添加Security库:
重新编译运行,问题解决。
相关文章推荐
- Xcode7 出现 linker command failed with exit code 1 (use -v to see invocation)解决方法
- iOS报错:linker command failed with exit code 1 (use -v to see invocation)解决方法
- 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),解决方法
- 解决 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)解决方法
- 使用个推出现Linker command failed with exit code 1 (use -v to see invocation))的解决方法
- Xcode提示linker command failed with exit code 1 (use -v to see invocation)解决方法
- 解决 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)的解决方法
- clang: error: linker command failed with exit code 1 (use -v to see invocation)解决方法
- xmpp框架搭建以及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) 解决办法
- linker command failed with exit code 1 (use -v to see invocation)解决办法
- 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)”问题
- linker command failed with exit code 1 (use -v to see invocation)解决办法
- linker command failed with exit code 1 (use -v to see invocation),经典Xcode编译错误的出现和解决!
- linker command failed with exit code 1 (use -v to see invocation)报错解决办法
- JNI运行Error:error: linker command failed with exit code 1 (use -v to see invocation)解决