Hello everyone.
I need to add a third party framework to my Xamarin.iOS app. I decided the best way to this was to create a static library first (in xCode), then make a Binding Library Project and finally add the reference to my Xamarin.iOS project.
I know the Binding Library is working, because I can call simple methods like NSLog, but when I try to call the framework methods Xamarin.iOS can't build. The static library and the Binding library build fine.
The errors I get are:
error : Native linking failed, undefined symbol: std::_List_node_base::unhook(). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
Native linking failed, undefined symbol: std::__throw_length_error(char const*). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
Native linking failed, undefined symbol: std::basic_string<char, std::char_traits, std::allocator >::basic_string(unsigned long, char, std::allocator const&). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
Native linking failed, undefined symbol: std::_Rb_tree_decrement(std::_Rb_tree_node_base const*). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
Native linking failed, undefined symbol: std::string::resize(unsigned long, char). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
Native linking failed, undefined symbol: std::string::assign(char const*, unsigned long). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
It seems that I am missing a Native Library somewhere. The native framework's official documentacion says it needs the followings frameworks and libraries:
OpenAL.framework, libresolv, libiconv, libbz2, libz; and all of them are added in the Static Library.
I tried to add the native framework reference to my Xamarin.iOS project, but I get a different error:
Native linking error: warning: ignoring file Native References/FunSDK.framework/FunSDK, file was built for unsupported file format ( 0x56 0x65 0x72 0x73 0x69 0x6F 0x6E 0x73 0x2F 0x43 0x75 0x72 0x72 0x65 0x6E 0x74 ) which is not the architecture being linked (arm64):
which is weird, because if I run the "xcrun -sdk iphoneos lipo -info" command on the framework I get: "Architectures in the fat file: /Users/diegodemarco/Desktop/funsdk ios/untitled folder/FunSDK.framework/Versions/A/FunSDK are: armv7 i386 x86_64 arm64"