"vtable for __cxxabiv1::__class_type_info", referenced from:

NO IMAGE

問題描述:

Undefined symbols for architecture i386:

  “std::terminate()”, referenced from:

      ___clang_call_terminate in libbaidumapapi.a(BMKManager.o)

      ___clang_call_terminate in libbaidumapapi.a(systemConfigModel.o)

      ___clang_call_terminate in libbaidumapapi.a(AppMan.o)

      ___clang_call_terminate in libbaidumapapi.a(VDeviceAPI.o)

      ___clang_call_terminate in libbaidumapapi.a(VFile.o)

      ___clang_call_terminate in libbaidumapapi.a(VCMMap.o)

      ___clang_call_terminate in libbaidumapapi.a(VBundle.o)

      …

  “vtable for __cxxabiv1::__class_type_info”, referenced from:

      typeinfo for _baidu_vi::CVMsgObserver in libbaidumapapi.a(AppMan.o)

      typeinfo for _baidu_vi::CVHttpEventObserver in libbaidumapapi.a(AppMan.o)

      typeinfo for _baidu_vi::CVArray<_baidu_vi::CVGpsObserver*, _baidu_vi::CVGpsObserver*&> in libbaidumapapi.a(VDeviceAPI.o)

      typeinfo for _baidu_vi::CVFile in libbaidumapapi.a(VFile.o)

      typeinfo for _baidu_vi::CVBundleValue in libbaidumapapi.a(VBundle.o)

      typeinfo for _baidu_vi::CVArray<_baidu_vi::CVBundle, _baidu_vi::CVBundle&> in libbaidumapapi.a(VBundle.o)

      typeinfo for _baidu_vi::CVArray<_baidu_vi::CVString, _baidu_vi::CVString&> in libbaidumapapi.a(VBundle.o)

      …

  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

  “vtable for __cxxabiv1::__si_class_type_info”, referenced from:

      typeinfo for CVNetStateObservable in libbaidumapapi.a(VNetStateObservable.o)

      typeinfo for CVNetStateObserver in libbaidumapapi.a(VNetStateObserver.o)

      typeinfo for _baidu_framework::CVDataStorage in libbaidumapapi.a(DataStorage.o)

      typeinfo for _baidu_framework::IVDataStorageInterface in libbaidumapapi.a(DataStorage.o)

      typeinfo for _baidu_framework::CVHttpClientPool in libbaidumapapi.a(HttpClientPool.o)

      typeinfo for _baidu_framework::IVHttpClientPoolInterface in libbaidumapapi.a(HttpClientPool.o)

      typeinfo for _baidu_framework::IVNetworkDetectInterface in libbaidumapapi.a(NetworkDetectEngine.o)

      …

  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

  “vtable for __cxxabiv1::__vmi_class_type_info”, referenced from:

      typeinfo for CAppMan in libbaidumapapi.a(AppMan.o)

      typeinfo for _baidu_framework::CNetworkDetectEngine in libbaidumapapi.a(NetworkDetectEngine.o)

  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

  “operator delete[](void*)”, referenced from:

      _baidu_vi::CVLeakInfoManager::~CVLeakInfoManager() in libbaidumapapi.a(VException.o)

      _baidu_vi::CVLeakInfoManager::~CVLeakInfoManager() in libbaidumapapi.a(VException.o)

      _baidu_vi::CVLeakInfoManager::~CVLeakInfoManager() in libbaidumapapi.a(VException.o)

      _baidu_vi::CVLeakInfoManager::GrowUp() in libbaidumapapi.a(VException.o)

  “operator delete(void*)”, referenced from:

      CAppMan::~CAppMan() in libbaidumapapi.a(AppMan.o)

      _baidu_vi::CVArray<_baidu_vi::CVGpsObserver*, _baidu_vi::CVGpsObserver*&>::~CVArray() in libbaidumapapi.a(VDeviceAPI.o)

      _baidu_vi::CVFile::~CVFile() in libbaidumapapi.a(VFile.o)

      _baidu_vi::CVBundleValue::~CVBundleValue() in libbaidumapapi.a(VBundle.o)

      _baidu_vi::CVArray<_baidu_vi::CVBundle, _baidu_vi::CVBundle&>::~CVArray() in libbaidumapapi.a(VBundle.o)

      _baidu_vi::CVArray<_baidu_vi::CVString, _baidu_vi::CVString&>::~CVArray() in libbaidumapapi.a(VBundle.o)

      _baidu_vi::CVArray<double, double&>::~CVArray() in libbaidumapapi.a(VBundle.o)

      …

  “operator new[](unsigned long)”, referenced from:

      _baidu_vi::CVLeakInfoManager::GrowUp() in libbaidumapapi.a(VException.o)

  “operator new(unsigned long)”, referenced from:

      _baidu_vi::CVUtilsNetwork::SetNetworkChangedCallback(void (*)()) in libbaidumapapi.a(VDeviceAPI.o)

      CVNetStateObservable::getInstance() in libbaidumapapi.a(VNetStateObservable.o)

      CVObservable::addObserver(CVObserver*) in libbaidumapapi.a(VNetStateObservable.o)

      _baidu_vi::CVException::Init() in libbaidumapapi.a(VException.o)

      _baidu_vi::CVThreadEventMan::GetIntance() in libbaidumapapi.a(VThread.o)

  “___cxa_begin_catch”, referenced from:

      ___clang_call_terminate in libbaidumapapi.a(BMKManager.o)

      ___clang_call_terminate in libbaidumapapi.a(systemConfigModel.o)

      ___clang_call_terminate in libbaidumapapi.a(AppMan.o)

      ___clang_call_terminate in libbaidumapapi.a(VDeviceAPI.o)

      ___clang_call_terminate in libbaidumapapi.a(VFile.o)

      ___clang_call_terminate in libbaidumapapi.a(VCMMap.o)

      ___clang_call_terminate in libbaidumapapi.a(VBundle.o)

      …

  “___cxa_pure_virtual”, referenced from:

      vtable for _baidu_vi::CVHttpRequestBase in libbaidumapapi.a(VHttpRequestBase.o)

  “___gxx_personality_v0”, referenced from:

      Dwarf Exception Unwind Info (__eh_frame) in AppDelegate.o

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(BMKManager.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(systemConfigModel.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(AppMan.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VDeviceAPI.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VFile.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VCMMap.o)

      …

      Dwarf Exception Unwind Info (__eh_frame) in AppDelegate.o

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(BMKManager.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(systemConfigModel.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(AppMan.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VDeviceAPI.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VFile.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VCMMap.o)

      …

      Dwarf Exception Unwind Info (__eh_frame) in AppDelegate.o

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(BMKManager.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(systemConfigModel.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(AppMan.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VDeviceAPI.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VFile.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VCMMap.o)

      …

      Dwarf Exception Unwind Info (__eh_frame) in AppDelegate.o

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(BMKManager.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(systemConfigModel.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(AppMan.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VDeviceAPI.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VFile.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VCMMap.o)

      …

      Dwarf Exception Unwind Info (__eh_frame) in AppDelegate.o

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(BMKManager.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(systemConfigModel.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(AppMan.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VDeviceAPI.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VFile.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VCMMap.o)

      …

      Dwarf Exception Unwind Info (__eh_frame) in AppDelegate.o

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(BMKManager.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(systemConfigModel.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(AppMan.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VDeviceAPI.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VFile.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VCMMap.o)

      …

      Dwarf Exception Unwind Info (__eh_frame) in AppDelegate.o

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(BMKManager.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(systemConfigModel.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(AppMan.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VDeviceAPI.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VFile.o)

      Dwarf Exception Unwind Info (__eh_frame) in libbaidumapapi.a(VCMMap.o)

      …

      …

ld: symbol(s) not found for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)

解決方案:
遇到這樣的問題主要是百度地圖匯入的配置不對,靜態庫中採用ObjectC 實現,因此需要您保證您工程中至少有一個.mm字尾的原始檔(您可以將任意一個.m字尾的檔案改名為.mm),或者在工程屬性中指定編譯方式,即將Xcode的Project -> Edit Active Target
-> Build -> GCC4.2 – Language -> Compile Sources As設定為”Objective-C “