error: linker command failed with exit code 1 解决方法之一

出现这种错误的原因可能很多,以下是我遇到的一种情况:

向项目中添加了新文件,没有加入compile source

编译报错:

ld: symbol(s) not found for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Showing first 200 warnings only

** BUILD FAILED **

解决:

在 build phases -> Compile Sources中添加新加的文件,重新编译即可。

原文地址:https://www.cnblogs.com/sagerking/p/5317019.html