Problem:
When I add the HockeyApp NuGet package to my Xamarin project my build breaks with the following errors:
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::__1::__vector_base_common<true>::__throw_length_error() const. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::rethrow_exception(std::exception_ptr). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::current_exception(). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::exception_ptr::exception_ptr(std::exception_ptr const&). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: std::exception_ptr::~exception_ptr(). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5202: Native linking failed. Please review the build log.
Solution:
Add the following mtouch arguments to your project.
-cxx -gcc_flags "-lc++"
Explanation:
- Right-click your project
- Select Properties
- Copy the following text
-cxx -gcc_flags "-lc++"
- Paste into Additional mtouch arguments
Make sure you repeat this for each configuration and platform.