xcode 编译问题

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 from "$(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

5.解决自动生成Connection时发生的xcode could not insert new xxx for的问题

 

场景是在storyboard下自动将组件拖入头文件代码中,生成自动连接模版,但是有时候会报错。
解决办法如下:
  • Close your project.
  • Go to the ~/Library/Developer/XCode/DerivedData folder and REMOVE all subfolders there referencing the project you are working on.
  • Open your project in XCode. The problem should be fixed now.

你可能感兴趣的:(编译问题,xcode错误调试)