Xcode 编译报错等问题记录

To update use: `gem install cocoapods`

5、XCocde 7 发生一系列警告:
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
浙公网安备 33010602011771号