iPhone 开发问题

1. 编译器提示类似file is universal but does not contain a(n) armv6 slice for architecture armv6的错误。可能是您的XCode版本过低,推荐使用4.2以上的版本,将XCode的Build Settings中的Architectures设置成arm7。

2. XCode提示有类似C++语法的错误。可能是您在调用接口时没有设置成OC与C++混编模式(具体做法为将调用接口的实现文件改为.mm的后缀)。

3. 提示类似ld: 3 duplicate symbols for architecture i386(arm7)的错误。可能是您用了与SDK相同的第三方库,解决方法是删除引起错误的第三方法库的实现文件(.m文件)。

4. 编译器提示类似file is universal (2 slices) but does not contain a(n) armv7s slice:…… for architecture armv7s的错误。是因为此版本的库还不支持arm7s的环境,将Build Settings项中的Valid ArchiteCtures中的arm7s删除即可解决。

5. 编译器提示类似Duplicate symbol _NN_Decode in /Users/…/libPPUserPayKit.a(UPPayRsa_nn.o)  for architecture armv7或Command /Developer/…/bin/llvm-g++-4.2 failed with exit code 1的错误。则是因为C++混编模式引起的,您可以将Build Settings 设置项里面的Other Linker Flags设置成空即可。



1. invalid deployment target for -stdlib=libc++ (requires iOS 5.0 or later)



这个是因为文件编译不支撑 可以将target-> Apple LLVM complier 4.1-Language ->C++ standard Library 改成Compiler Default.

2.Undefined symbols for architecture armv
解决办法:看下是否是没有添加libz.1.2.5.dylib的静态库。


3.   does not contain a(n) armv7s slice

这个是因为引入外部static lib时辰报错,因为xcode进级成4.5后,编译布局有armv7和armv7s,若是这个时辰编译会告诉编译有题目,不支撑armv7s,批改的体式格式如下:

Got the same problem since updating XCode. To work around it, in the XCode project, change the Architecture "¥(ARCHS_STANDARD_32_BIT)" to armv7. "¥(ARCHS_STANDARD_32_BIT)" expands to something like armv7, armv7s and the current unity editor doesn""t seem to export the correct symbols for armv7s.

4.Undefined symbols for architecture 错误会决

 

这个错误是因为资料无法编译经由过程报出的。一般是从别的一个项目直接复制到新项目导致新项目无法编译呈现的题目。
解决办法如下
  • Go to the Target in the navigator menu
  • Click on the "Build Phases" tab
  • Add the .m file to "Compile Sources" (either drag it across, or use the + button)
  • Add the .xib to "Copy bundle resources"
  • Clean and build

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值