Xcode中经常出现的编译错误 linker command failed with exit code...

4 篇文章 0 订阅

错误

计算机生成了可选文字:By File By Type 1 issue iOS Deployment Target '9.1' is newer than SDK 'iOS 9.0' in target 06_... V C) 1 is... iOS Deployment Target '9.1' is newer than SDK 'iOS 9.0' in target 06_... v 2 issues O O "_OBJC_CLASS_ $_HMWeiboCell", referenced from: O Linker command failed with exit code 1 (use -v to see invocation) Recent All Issues V . Link Ld cknmkzn/Build/Products/Det normal x86_64 export export platform/Developer/u Developer/us r/bin : /us r/ loca l/ bin : /us r/bin : /bin: /usr/sbin : /sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86. Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.ø. sdk dyeyuekvsstjzqhfvhajj cknmkzn/Build/Products/Debug-iphonesimulator -F/Users/WR/Library/Developer/Xcode/De dyeyuekvsstjzqhfvhajjcknmkzn/Build/Products/Debug-iphonesimulator -filet ist /Users/WR/Library/Developer/) dyeyuekvs st j zqhfvhaj j cknmkzn/ Bui Id/lnte rmed bui Id/Debug-iphones imulator/06_Rt*f51J. bui Id/ Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=8.ø -Xlinker -Xlinker -dependency_info -Xlinker {51]. -o /l Rt*f51J-dyeyuekvsstj zqhfvhaj j cknmkzn/Bui Id/P roducts/Debug-iphones imu Undefined symbols for architecture x86_64: referenced from: obj c-class-ref in HMTableViewController.o Id: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use O "_OBJC_CLASS_$_HMWeiboCell", referenced from: Objc-class-ref in HMTableViewController.o Symbol(s) not found for architecture x86_64 O Linker command failed with exit code 1 (use -v to see invocation) -v to see invocation) Activity Log Complete 16/3/1 2 errors Linker command failed with exit code 1 (use -v to see invocation) 16/3/1 TCF-8:59

 

 

解决方式

计算机生成了可选文字:Running on iPhone 5s V Others Categories A iPhone 5s PROJECT TARGETS General Capabilities Resource Tags Info Build Settings Build Phases Build Rules Filter h AppDelegate.h m AppDelegate.m Controllers V V V V h HMTable...ntroller.h m HMTable...ntroller.m Views a Main.storyboard LaunchS...toryboard h HMWeiboCell.h m HMWeiboCell.m Models h HMWeibo.h m HMWeibo.m h HMWeiboFrame.h m HMWeiboFrame.m Supporting Files Assets.xcassets Info.plist weibos.plist m main.m Products Target Dependencies (O items) Compile Sources (7 items) Name HMWeiboCell.m ...in HMWeiboFrame.m ...in 06_iÄt$ NSString+HMExt.m AppDelegate.m ...in main.m m HMTable H o. ontroller.m ...in m ...in ok7 e Filter Link Binary With Libraries (O items) Copy Bundle Resources (4 items)

或者删除参与编译但是找不到的文件

 

 

错误

计算机生成了可选文字:u Ica e s a ero. Icon n: / Users/yolan e/ Li cdadhan rzhlcaaadvky soxffwx re/ Bui Id/ In te rmed . bui Id/Debug— iphones imulato r bu i ect s—no rnat/x86_64/V iewCont rol te r. o 'Us ers/yo lande/ Lib ra ry/Deve tope r /Xcode/De ri ved Data/Ø4_m Sip Lis cdadhan rzhlcaaadvky soxffwx re/ Bui Id/ln te med bui Id/Debug— i honesimulator e4 list up Ica e sym a . build/Objects—no o HMHero. name In: cdadhan rzhlcaaadvky soxffwx re/ Bui Id/ In te rmed ia bui Id/Debug— iphones imulato r bu i ect s—no rnat/x86_64/V iewCont rol te r. o 'Us ers/yo lande/ Lib ra ry/Deve tope r /Xcode/De ri vedData/ø4_m Sip Lis cdadhan rzhlcaaadvky soxffwx re/ Bui Id/ln te med bui Id/Debug— iPhon es imulato r /ø4_fi0Äptis . bu i Id/Obj e ct s—no rnat/x86_64/HMHe ro. o clang: error: linker command failed with exit code I (use to see invocation) r arc Itecturex up ca e sym o s O Linker command failed with exit code I (use -v to see invocation) Activity Log complete 16/3/7 F5:28 I error

 

 

解决方式

1.一般导入了.m文件,换成.h文件就没问题了

2.还有可能出现了同名的文件

 

错误:

 

计算机生成了可选文字:Inte rmed bu ild/Debug—iphonesimu lato r/n dat —o /Users/zhangyinhong/Library/Developer/Xco' beouqatcj cxpa ifpbbmsv rbj ruuz/ Bui Id/Products/Debug—iphonesimu lato r/ Undefined symbols for architecture x86 _ 64: referenced from: main" implicit ent ry/start for main executable Id: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use O "-main", referenced from: Implicit entry/start for main executable Symbol(s) not found for architecture x86_64 O Linker command failed with exit code 1 (use -v to see invocation) O Activity Log Complete 1614127 2 errors, 2 warnings -v to see

 解决办法:

估计是不小心把main函数删了!!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值