ld: symbol(s) not found for architecture armv7s

XCODE4升级到XCODE5编译就不通过了错误如下:

ld: warning: directory not found for option '-L/Users/paul/Android/baidu_tongji_source/ios-sdk/BaiduMobStatSample/../BaiduMobStat/DerivedData/BaiduMobStat/Build/Products/Debug-iphoneos'

ld: warning: ignoring file /Users/paul/Library/Developer/Xcode/DerivedData/BaiduMobStatSample-eqytpjphifilvcdgslntagloteig/Build/Products/Debug-iphoneos/libBaiduMobStat.a, file was built for archive which is not the architecture being linked (armv7s): /Users/paul/Library/Developer/Xcode/DerivedData/BaiduMobStatSample-eqytpjphifilvcdgslntagloteig/Build/Products/Debug-iphoneos/libBaiduMobStat.a

Undefined symbols for architecture armv7s:

  "_OBJC_CLASS_$_BaiduMobStat", referenced from:

      objc-class-ref in BaiduMobStatAppDelegate.o

      objc-class-ref in MyPageLogViewController.o

     (maybe you meant: _OBJC_CLASS_$_BaiduMobStatAppDelegate)

ld: symbol(s) not found for architecture armv7s

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



解决方法:

     进入Build Settings 找到Architectures 选择Standard architectures

找到Valid Architectures选择armv7和armv7s两项,其余删除

此时clean工程 编译如果还出现该错误,请找到Build Active Architecture Only项选择YES,然后编译通过后再改回NO。之后就正常了。


  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值