Apple Mach-O Linker Error-iOS

项目开发的过程中添加新的文件时常常会出现这样的错误“Apple Mach-O Linker Error”,“clang: error: linker command failed with exit code 1 (use -v to see invocation)”这样的错误提示。
这是因为错误的引用导致的,解决的方法有以下方式:
1. 在工作左边导航栏Target–>Build Phases–>compile Sources中检查有没有重复引用的文件,或者是漏引用的文件。
2. 检查项目中有没有“CGFloat const ksegementWith = 100;”,这样的全局常量,Xcode的clang编译器不允许出现重名,否则会导致错误。

发布了35 篇原创文章 · 获赞 9 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/SunFlowerInRain/article/details/71194258