"std::__1::basic_string::__init(char

这是我在接入芝麻信用的时候碰到的问题 

Undefined symbols for architecture x86_64:

  "std::__1::basic_string, std::__1::allocator >::__init(char const*, unsigned long)", referenced from:

      CAliSecXURL::encodeURIComponent(CAliSecXBuffer&) in ZMDependUponSDK(APSecCrypto)

  "std::__1::basic_string, std::__1::allocator >::reserve(unsigned long)", referenced from:

      CAliSecXURL::encodeURIComponent(CAliSecXBuffer&) in ZMDependUponSDK(APSecCrypto)

  "std::__1::basic_string, std::__1::allocator >::~basic_string()", referenced from:

      CAliSecXURL::encodeURIComponent(CAliSecXBuffer&) in ZMDependUponSDK(APSecCrypto)

  "std::nothrow", referenced from:

      CAliSecXBuffer::CAliSecXBuffer(unsigned long) in ZMDependUponSDK(APSecCrypto)

      CAliSecXBuffer::_copy(unsigned char const*, unsigned long) in ZMDependUponSDK(APSecCrypto)

      CAliSecXBuffer::resize(unsigned long) in ZMDependUponSDK(APSecCrypto)

  "std::terminate()", referenced from:

      ___clang_call_terminate in ZMDependUponSDK(APSecCrypto)

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

      CAliSecXBuffer::~CAliSecXBuffer() in ZMDependUponSDK(APSecCrypto)

      CAliSecXBuffer::release() in ZMDependUponSDK(APSecCrypto)

      CAliSecXBuffer::~CAliSecXBuffer() in ZMDependUponSDK(APSecCrypto)

      CAliSecXBuffer::operator=(CAliSecXBuffer const&) in ZMDependUponSDK(APSecCrypto)

      CAliSecXBuffer::resize(unsigned long) in ZMDependUponSDK(APSecCrypto)

      alisec_crypto_Hex2Bin(CAliSecXBuffer const&) in ZMDependUponSDK(APSecCrypto)

      alisec_crypto_Bin2Hex(CAliSecXBuffer const&) in ZMDependUponSDK(APSecCrypto)

      ...

  "operator new[](unsigned long, std::nothrow_t const&)", referenced from:

      CAliSecXBuffer::CAliSecXBuffer(unsigned long) in ZMDependUponSDK(APSecCrypto)

      CAliSecXBuffer::_copy(unsigned char const*, unsigned long) in ZMDependUponSDK(APSecCrypto)

      CAliSecXBuffer::resize(unsigned long) in ZMDependUponSDK(APSecCrypto)

  "___cxa_begin_catch", referenced from:

      ___clang_call_terminate in ZMDependUponSDK(APSecCrypto)

  "___gxx_personality_v0", referenced from:

      +[ASSStorageAccesser saveStorageModel:] in ZMDependUponSDK(APSecSecuritySDK)

      +[ASSStorageAccesser loadStorageModelFromKeychain] in ZMDependUponSDK(APSecSecuritySDK)

      +[ASSStorageAccesser loadPreviousApdid] in ZMDependUponSDK(APSecSecuritySDK)

      +[ASSStorageAccesser getRandomizedID] in ZMDependUponSDK(APSecSecuritySDK)

      +[ASSStorageAccesser getNewRadomizedID] in ZMDependUponSDK(APSecSecuritySDK)

      +[ASSStorageAccesser getRadomizedClientKey] in ZMDependUponSDK(APSecSecuritySDK)

      +[ASSStorageAccesser getClientKeyDataFormation:] in ZMDependUponSDK(APSecSecuritySDK)

      ...

ld: symbol(s) not found for architecture x86_64

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




解决方法
  注意: 由于sdk里面有用到c编译,请把调用queryUserAuthReq的controller后缀名改成.mm

只要把控制器的后缀改成.mm就可以了


你可能感兴趣的:(报错处理)