2014-12-19 27 views
2

我在iOS項目中使用VLCKit(MobileVLCKit.framework)。起初一切運作良好。然後我添加一些C++代碼,所以一些文件是.mm文件。當我編譯時,它失敗了。 Xcode日誌VLCKit與iOS項目中的.mm文件衝突

Undefined symbols for architecture armv7: 
    "std::runtime_error::runtime_error(std::string const&)", referenced from: 
     libebml::CRTError::CRTError(std::string const&, int) in MobileVLCKit(StdIOCallback.o) 
    "std::ostream& std::ostream::_M_insert<void const*>(void const*)", referenced from: 
     libebml::IOCallback::writeFully(void const*, unsigned long) in MobileVLCKit(IOCallback.o) 
     libebml::IOCallback::readFully(void*, unsigned long) in MobileVLCKit(IOCallback.o) 
    "std::runtime_error::runtime_error(std::string const&)", referenced from: 
     libebml::IOCallback::writeFully(void const*, unsigned long) in MobileVLCKit(IOCallback.o) 
     libebml::IOCallback::readFully(void*, unsigned long) in MobileVLCKit(IOCallback.o) 
     "VTT for std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >", referenced from: 
... 

我不知道爲什麼以及如何解決這個問題。

回答

5

我找到了解決方案:在構建設置中將C++標準庫更改爲libstdC++(GNU C++標準庫)。