Adding HockeyApp to Xamarin project breaks my build

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:

  1. Right-click your project
  2. Select Properties
  3. Copy the following text
    -cxx -gcc_flags "-lc++"
  4. Paste into Additional mtouch arguments
    image

Make sure you repeat this for each configuration and platform.

image

Add comment

Loading