ios 編譯過程中碰到std::ios_base::Init::~Init()錯誤的問題解決方案

來源:互聯網
上載者:User

標籤:des   blog   http   io   ar   os   sp   for   strong   

轉載自:http://wicrewoft.blog.51cto.com/210706/1236005 原範國鋒標籤:libstdc++.6.dylib如果遇到下面這個問題是因為引用的c++庫不正確導致,xcode 6.1版本需要引用  libstdc++.6.dylib才能解決問題。 
Undefined symbols for architecture armv6:"std::ios_base::Init::~Init()", referenced from:  ___tcf_0 in libmyCppLib_dev.a(myCppLib.o)"std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)", referenced from:      _show_the_world in libmyCppLib_dev.a(myCppLib.o)"std::ios_base::Init::Init()", referenced from:  __static_initialization_and_destruction_0(int,int)in libmyCppLib_dev.a(myCppLib.o)"std::cout", referenced from:  _show_the_world in libmyCppLib_dev.a(myCppLib.o)ld: symbol(s) not found for architecture armv6collect2: ld returned 1 exit status

 

The correct answer was provided by Jimmy Koerting in the comments: the app needs to be linked against libstdc++.dylib to resolve the standard library symbols. Thanks to Jimmy Koerting, but one more thing i want to add here is, if you are using xcode latest version with iOS 6.1 please add thislibstdc++.6.dylib

 

http://stackoverflow.com/questions/6882817/building-static-c-lib-for-use-with-objective-c-app-in-xcode-4

本文出自 “範國鋒” 部落格,請務必保留此出處http://wicrewoft.blog.51cto.com/210706/1236005

ios 編譯過程中碰到std::ios_base::Init::~Init()錯誤的問題解決方案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.