title: Xamarin.Android: How do you link a static library?
body: <p>I am trying to link a static library (foo.a) - which contains C++ code - in an Xamarin.Android project following the <a href="http://docs.xamarin.com/guides/android/advanced_topics/using_native_libraries" rel="noreferrer">directions</a> found in Xamarin's docs.  Neither the "path sniffing method," nor the "Abi element within the project file" method seems to work.</p>
  
  <p>Using either method I get unhandled exceptions when I attempt to call into the library functions:</p>
  
  <pre><code>I/mono( 2591): [ERROR] FATAL UNHANDLED EXCEPTION: System.EntryPointNotFoundException: ...
  </code></pre>
  
  <p>I should mention that I have had no trouble linking and calling into this library (built for armv7, armv7s) with my Xamarin.iOS project using the "additional mtouch arguments" -cxx method described <a href="http://docs.xamarin.com/guides/ios/advanced_topics/native_interop" rel="noreferrer">here</a>. All of my DLLImports are the same across platforms...</p>
  
  <pre><code>[DllImport(Import.lib, CallingConvention=CallingConvention.Cdecl )]
  internal static extern IntPtr FooMethodName(args);
  </code></pre>
  
  <p>So, what am I missing?</p>
  
  <p>FYI:
  I am using Xamarin Studio 4.0.5 (build 4), Xamarin.Android 4.6.4 (Business Edition)</p>