Xcode 編譯報錯等問題記錄

  1、IOS編譯時有時出現這樣的錯誤,要注意,錯誤不在Undefined for architecture i386,而是下面下劃線開頭的變量沒定義,此時須要導入libz到項目便可。
 
用zbar和zipachieve這個庫須要導入libz.dylib
二、在import第三方框架的時候(好比自定義的framework import pods),提示找不到文件,能夠檢查引用的頭部文件是否包含
找到 Header Search Paths 添加 $(SRCROOT)/../Pods/Headers/Public
 
三、
CocoaPods 0.38.2 is available.
To update use: `gem install cocoapods`
 
四、記錄錯誤:
提示,找不到AFDownloadRequestOperation,我嘗試着加上正確的地址,仍是不行,而後我在Architectures 添加了armv7s 神奇的編譯經過了,不知道爲何,誰能解釋下
而後 這樣不行的話在Build Settings-> Architechures 中 設置Build Active Architecture Only 設置爲NO

五、XCocde 7 發生一系列警告:node

暫且在修改debug 模式的Debug Information Format 爲DWARF

 

六、ios

編譯的時候,出錯:Undefined symbols for architecture x86_64: "_llvm_gcda_emit_arcs", referenced from:c++

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" 改成Yesapp

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

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

七、ui

iOS項目中引入c++庫,編譯連接時報以下錯:spa

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

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

"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
相關文章
相關標籤/搜索