Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Error using Native linking

We are working at a iOS native binding. We followed the next workflow:

  • Generate a wrapper to reduce the exported methods and hold the native dependencies (libSomethingA.a, libSomethingB.a, libSomethingC.a)
  • Create a fat binary libWrapperSDK.a (for emulator and devices) using the libWrapper-i386.a and libWrapper-armv7.a
  • Generate the ApiDefinition.cs and StructsAndEnums.cs with sharpie
  • Compile binding with the previous files and the libWrapperSDK.a
  • Try to use the library in a test Xamarin-iOS project:

In the last step we get the next error when trying to compile:

/Users/miguelcatalan/Proyectos/Xamarin/TestiOS/TestiOS/MTOUCH: Error MT5210: Native linking failed, undefined symbol: typeinfo for  std::__1::basic_streambuf<char, std::__1::char_traits<char> >. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (TestiOS)

Someone has any clue to solve this? we are blocked :/


  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai


    Take a look at this comment. This will link in the C++ frameworks for those symbols. I am not quite sure which one it needs, so try 1 than the other if that does not work.

  • Thanks @JohnMiller, finally you point me to the right track, I solved this adding the missing Frameworks and links.

    [assembly: LinkWith ("libTasWrapperSDK.a", SmartLink = true, ForceLoad = false, Frameworks = "CFNetwork SystemConfiguration", LinkerFlags = "-lstdc++ -lz")]
Sign In or Register to comment.