添加第三方类库造成的linker command failed with exit code 1 (use -v to see invocation)的错误调试

linker command failed with exit code 1 (use -v to see invocation)错误解决办法:

在工作左边导航栏Target-->Build Phases-->compile Sources中,第三库库的所有.m文件都添加到里面,然后编译通过了;


添加第三方类库造成的linker command failed with exit code 1 (use -v to see invocation)的错误调试_第1张图片


添加.m文件

添加第三方类库造成的linker command failed with exit code 1 (use -v to see invocation)的错误调试_第2张图片


根据对比可以看见 in FMDBTest,FMDBTest的Target里添加进去了了一些.m文件

添加第三方类库造成的linker command failed with exit code 1 (use -v to see invocation)的错误调试_第3张图片


我们在使用这些第三方类库文件时直接将其拖拽到工程之中,编译的的时候Xcode也没有自动引用,所以造成这样错误,这就需要我们手动添加。

2、找到Build settings->Linking->Other Linker Flags,将此属性修改成-all_load或把Other Linker Flags下的属性全删除。

你可能感兴趣的:(添加第三方类库造成的linker command failed with exit code 1 (use -v to see invocation)的错误调试)