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.
这个是因为引入外部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.
这个错误是因为资料无法编译经由过程报出的。一般是从别的一个项目直接复制到新项目导致新项目无法编译呈现的题目。
解决办法如下
- 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