IOS6 build communication error

I create a link to an application with a static lib, found that errors follow

Undefined symbols for architecture armv7: "std::_List_node_base::hook(std::_List_node_base*)", referenced from: std::list<TSendBuf, std::allocator<TSendBuf> >::_M_insert(std::_List_iterator<TSendBuf>, TSendBuf const&) in libCardAnalyLib1.a(SendRecvThread.o) "std::_List_node_base::unhook()", referenced from: std::list<TSendBuf, std::allocator<TSendBuf> >::_M_erase(std::_List_iterator<TSendBuf>) in libCardAnalyLib1.a(SendRecvThread.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) 

Can someone tell me what this error is? thanks.
And there is C ++ code in the application and in lib. my demo application cannot link lib shows this error and TSendBuf -

 typedef struct { unsigned char szBuf[1200];//1000 fah char } TSendBuf; 
+4
source share
2 answers

You probably need to add libstdc++.dylib to the list of frameworks / binaries your applications are bound to.

You can do this from the target settings / tab "Assembling phases" / section "Linking to libraries"

+3
source

The library and the application may not match in the link settings.

Check the C ++ settings of the standard library in the Apple LLVM compiler in the Xcode settings Build settings for both your library and your application. Those must match.

Assume that the library in question is not what you create yourself, and if this library was built some time ago (pre Xcode 4.5 / LLVM 4.1), then the “correct” parameter for your application will be libstdC ++ ( GNU Standard Library C ++) .

+2
source

All Articles