linker command failed with exit code 1出错原因
2016-03-21 23:10
441 查看
一 错误提示
Ld /Users/xiaofeng/Library/Developer/Xcode/DerivedData/19-彩票-graxlvptvuraokexhzwsvioexhqu/Build/Products/Debug-iphonesimulator/19-彩票.app/19-彩票 normal x86_64 cd /Users/xiaofeng/Desktop/APP/19-彩票 export IPHONEOS_DEPLOYMENT_TARGET=9.2 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -L/Users/xiaofeng/Library/Developer/Xcode/DerivedData/19-彩票-graxlvptvuraokexhzwsvioexhqu/Build/Products/Debug-iphonesimulator -F/Users/xiaofeng/Library/Developer/Xcode/DerivedData/19-彩票-graxlvptvuraokexhzwsvioexhqu/Build/Products/Debug-iphonesimulator -filelist /Users/xiaofeng/Library/Developer/Xcode/DerivedData/19-彩票-graxlvptvuraokexhzwsvioexhqu/Build/Intermediates/19-彩票.build/Debug-iphonesimulator/19-彩票.build/Objects-normal/x86_64/19-彩票.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.2 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -dependency_info -Xlinker /Users/xiaofeng/Library/Developer/Xcode/DerivedData/19-彩票-graxlvptvuraokexhzwsvioexhqu/Build/Intermediates/19-彩票.build/Debug-iphonesimulator/19-彩票.build/Objects-normal/x86_64/19-彩票_dependency_info.dat -o /Users/xiaofeng/Library/Developer/Xcode/DerivedData/19-彩票-graxlvptvuraokexhzwsvioexhqu/Build/Products/Debug-iphonesimulator/19-彩票.app/19-彩票 Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_XFHallViewController", referenced from: objc-class-ref in XFTabBarController.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
二 错误原因
1 创建了类名相同的类
2 用类的时候,倒入了.m文件
3 编译的时候.m文件并没有参加编译
4 用第三方框架的时候,框架没有参与编译(.m文件)
三 解决办法
1 检查你的类名看是否有重复的
2 检查你用类别的时候导入的文件是否正确
3 将.m文件导入到编译区
图一:图二:
四 总结
注意:用第三方框架的时候要特别的注意,特别是从别的文件中直接拖过来用,首先先编译下,看是否可以,否则等到代码写的差不多了,编译的时候出现问题,那就麻烦了.可能还有其它问题,需要的话请给我留言.
相关文章推荐
- remount of system failed: Read-only file system remount failed 解决方案
- 人工智能发展
- 【leetcode】Array——Container With Most Water(11)
- 使用Genymotion调试出现错误INSTALL_FAILED_CPU_ABI_INCOMPATI
- Aizu 2450 Do use segment tree 树链剖分
- hdu1022Train Problem I
- hdu 1151 Air Raid DAG最小路径覆盖
- Rails中使用邮箱验证及激活用户
- Dsamain
- rails 路由设置 无法匹配 小数点
- rails中select_tag的用法小结
- rails调试
- Rails插件之ckeditor
- Rails插件之byebug
- LeetCode 70 Climbing Stairs
- 简单AIDS的源码学习 <utils.c>
- [LeetCode]-DataBase-Delete Duplicate Emails
- strong,weak,assign,retain,copy区别与联系
- [LeetCode]-DataBase-Duplicate Emails
- async & await 的前世今生