Xcode 编译报错等问题记录

 1、IOS编译时有时出现这样的错误,要注意,错误不在Undefined for architecture i386,而是下面下划线开头的变量没定义,此时需要导入libz到项目即可。
 
用zbar和zipachieve这个库需要导入libz.dylib
2、在import第三方框架的时候(比如自定义的framework import pods),提示找不到文件,可以检查引用的头部文件是否包含
找到 Header Search Paths 添加$(SRCROOT)/../Pods/Headers/Public
 
3、
CocoaPods 0.38.2 is available.
To update use: `gem install cocoapods`
 
4、记录错误:
提示,找不到AFDownloadRequestOperation,我尝试着加上正确的地址,还是不行,然后我在Architectures 添加了armv7s 神奇的编译通过了,不知道为什么,谁能解释下
然后 这样不行的话在Build Settings-> Architechures 中 设置Build Active Architecture Only 设置为NO

5、XCocde 7 发生一系列警告:

暂且在修改debug 模式的Debug Information Format 为DWARF

 

6、

编译的时候,出错:Undefined symbols for architecture x86_64: "_llvm_gcda_emit_arcs", referenced from:

Undefined symbols for architecture x86_64:
  "_llvm_gcda_emit_arcs", referenced from:
      ___llvm_gcov_writeout in libPKRevealController.a(PKRevealController.o)
      ___llvm_gcov_writeout in libPKRevealController.a(PKAnimation.o)
      ___llvm_gcov_writeout in libPKRevealController.a(PKLayerAnimator.o)
      ___llvm_gcov_writeout in libPKRevealController.a(PKRevealControllerView.o)
      ___llvm_gcov_writeout in libPKRevealController.a(PKSequentialAnimation.o)
      ___llvm_gcov_writeout in libPKRevealController.a(UIViewController+PKRevealController.o)
      ___llvm_gcov_writeout in libPKRevealController.a(NSObject+PKBlocks.o)
      ...
  "_llvm_gcda_emit_function", referenced from:
      ___llvm_gcov_writeout in libPKRevealController.a(PKRevealController.o)
      ___llvm_gcov_writeout in libPKRevealController.a(PKAnimation.o)
      ___llvm_gcov_writeout in libPKRevealController.a(PKLayerAnimator.o)
      ___llvm_gcov_writeout in libPKRevealController.a(PKRevealControllerView.o)
      ___llvm_gcov_writeout in libPKRevealController.a(PKSequentialAnimation.o)
      ___llvm_gcov_writeout in libPKRevealController.a(UIViewController+PKRevealController.o)
      ___llvm_gcov_writeout in libPKRevealController.a(NSObject+PKBlocks.o)
      ...

解决方法:"Instrument Program Flow" 改为Yes

http://blog.csdn.net/guojin08/article/details/48553077

http://stackoverflow.com/questions/7949781/undefined-symbols-for-architecture-i386-upgrading-project-to-ios-5

7、

iOS项目中引入c++库,编译链接时报如下错:

"std::string::_Rep::_M_destroy(std::allocator<char> const&)", referenced from:

"std::_List_node_base::hook(std::_List_node_base*)", referenced from:

"std::string::push_back(char)", referenced from:

"std::string::append(char const*, unsigned long)", referenced from:

"std::string::_Rep::_S_empty_rep_storage", referenced from:

很明显,以上都是stdc++标准库函数。

检查Build Phases->Link Binary With Libraries 也包含了libstdc++.dylib库,libstdc++.6.0.9.dylib

 

 
a
 
 

posted on 2015-04-11 16:43  二狗你变了  阅读(1872)  评论(0)    收藏  举报

导航