title: Xamarin failing to compile to native code
body: <p>I am trying to use the Good Dynamics SDK in Xamarin, I don't know Objective-C well so I am a bit lost here. This is an attempt at a proof of concept, I'm not sure if this is actually doable. </p>
  
  <p>I've added the GD file as GD.a from the GD.framework directory and attempted to implement an API binding and duplicate the application start logic from the sample XCode project.</p>
  
  <p>I managed to get it to build even though Mono Develop is showing everything from the ApiDefinition in red.</p>
  
  <p>When building this is part of the error log  <a href="http://pastebin.com/ZdZ0DBsr" rel="nofollow">Full version here</a> </p>
  
  <pre><code>/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc  -Wl,-no_pie -arch i386 -gdwarf-2 -fobjc-legacy-dispatch -fobjc-abi-version=2 -miphoneos-version-min=6.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk  /var/folders/1t/cbdvyj0x4n35m7674l7wvyjc0000gn/T/tmp6df5493a.tmp/main.x86.o -o /var/folders/1t/cbdvyj0x4n35m7674l7wvyjc0000gn/T/tmp6df5493a.tmp/GDTest -framework CFNetwork -framework Foundation -framework GameKit -framework MapKit -framework MediaPlayer -framework MessageUI -framework OpenGLES -framework StoreKit -framework UIKit -framework AddressBookUI -framework SystemConfiguration -framework AddressBook -framework AudioToolbox -framework AVFoundation -framework QuartzCore -framework CoreGraphics -framework CoreLocation -framework MobileCoreServices -framework Security -framework CoreData -framework ExternalAccessory -weak_framework AssetsLibrary -weak_framework Accounts -weak_framework CoreBluetooth -weak_framework CoreTelephony -weak_framework EventKit -weak_framework EventKitUI -weak_framework CoreMotion -weak_framework GLKit -weak_framework iAd -weak_framework NewsstandKit -weak_framework Social -weak_framework Twitter -weak_framework PassKit -weak_framework CoreImage -weak_framework CoreText -weak_framework ImageIO -weak_framework CoreMedia -weak_framework CoreMIDI -weak_framework CoreVideo -weak_framework AdSupport -weak_framework QuickLook -lz -u _mono_pmip -u _CreateZStream -u _CloseZStream -u _Flush -u _ReadZStream -u _WriteZStream -liconv -lmono-2.0 -lmonotouch -L/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib -u _catch_exception_raise  -force_load /var/folders/1t/cbdvyj0x4n35m7674l7wvyjc0000gn/T/tmp6df5493a.tmp/GD.a
      Undefined symbols for architecture i386:
        "std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;::gcount() const", referenced from:
            GT::AES::decode(std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;&amp;, std::basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt;&amp;, unsigned int&amp;, bool)in GD.a(gtaes.o)
            GT::AES::encode(std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;&amp;, std::basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt;&amp;, unsigned int&amp;, bool)in GD.a(gtaes.o)
        "std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::find_first_of(char const*, unsigned long, unsigned long) const", referenced from:
            -[GDSetPasswordViewController checkPasswordStrength:] in GD.a(GDSetPasswordViewController.o)
            GD::EacpCReq::EacpCReq(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, GT::Dbb&amp;)in GD.a(GDEacpCommands.o)
            GD::RawSocket::connect()    in GD.a(GDRawSocket.o)
        "std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::copy(char*, unsigned long, unsigned long) const", referenced from:
            GD::Socket::toString() constin GD.a(GDSocket.o)
        "std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::data() const", referenced from:
            -[GTContainerDH setRemotePublic521:] in GD.a(GTContainerCrypto.o)
            -[GTContainerDH initWithP521] in GD.a(GTContainerCrypto.o)
            -[NSData(GTContainerEncryption) GTEncryptedDataUsingDerivedKey:] in GD.a(GTContainerCrypto.o)
            -[NSData(GTContainerEncryption) GTDecryptedDataUsingDerivedKey:] in GD.a(GTContainerCrypto.o)
            -[GTEncryptedFile streamDidReceiveData:] in GD.a(GTEncryptedFile.o)
            +[NSData(Base64) dataFromBase64String:] in GD.a(NSData+Base64.o)
            +[GTJsonCommandProcessor parseNSData:] in GD.a(GTICCJsonCommandProcessor.o)
            ...
  </code></pre>
  
  <p>This goes on for a lot longer and it finishes with the error</p>
  
  <pre><code>ld: symbol(s) not found for architecture i386
  collect2: ld returned 1 exit status
  
  error MT5202: Native linking failed. Please review the build log.
  </code></pre>
  
  <p>Now I'm a bit stuck. Any ideas?</p>
  
  <p>Thanks</p>