Native binding error:Undefined symbols for architecture i386 for mono libs

AlexanderDorokhovAlexanderDorokhov RUMember
edited April 2013 in Xamarin.iOS

Greetings,

I am trying to link pjsip library (compiled for i386 iphone simulator sdk 6.1, in attachment) into simple Xamarin IOS app project.
But, sadly, im getting "Undefined symbols for architecture i386" somewhere deep in mono as soon as i have add this lib as a native references. Same library works well with XCode`s iphone application on simulator.

Any help would be appreciated .

Best regards, Alex D

Error stack:

[2013-04-21 19:28:52.1] Undefined symbols for architecture i386:
[2013-04-21 19:28:52.1]   "]strlen", referenced from:
[2013-04-21 19:28:52.1]       _set_domain_search_path in libmono-2.0.a(libmonoruntime_la-appdomain.o)
[2013-04-21 19:28:52.1]       _get_shadow_assembly_location_base in libmono-2.0.a(libmonoruntime_la-appdomain.o)
[2013-04-21 19:28:52.1]       _shadow_copy_sibling in libmono-2.0.a(libmonoruntime_la-appdomain.o)
[2013-04-21 19:28:52.1]       _real_load in libmono-2.0.a(libmonoruntime_la-appdomain.o)
[2013-04-21 19:28:52.1]       _mono_make_shadow_copy in libmono-2.0.a(libmonoruntime_la-appdomain.o)
[2013-04-21 19:28:52.1] ld: symbol(s) not found for architecture i386
[2013-04-21 19:28:52.1] collect2: ld returned 1 exit status

Build command line:

[2013-04-21 19:28:52.1] /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.1 -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk  /Users/Admin/Library/Caches/Xamarin/mtbs/builds/HelloWorld_App1/3a576519-c6ad-44c0-8cc9-1398070db18b/output/temp/mtouch-cache/main.i386.cache.jpKwwUNDBe8syvr5WlrQpLXsNFI=.o -o /var/folders/gg/wm_1mm3s4hn4bf9b5_2xbmdw0000gn/T/tmp5222e9ec.tmp/HelloWorld_App1 -framework CFNetwork -framework Foundation -framework UIKit -framework AudioToolbox -framework CoreGraphics -lz -liconv -u _mono_pmip -u _monotouch_create_managed_ref -u _monotouch_release_managed_ref -u _monotouch_IntPtr_objc_msgSend_IntPtr -u _monotouch_IntPtr_objc_msgSendSuper_IntPtr -u _CloseZStream -u _CreateZStream -u _Flush -u _ReadZStream -u _WriteZStream -lmono-2.0 -lmonotouch-debug -L/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib -u _catch_exception_raise "-L/Users/Admin/Library/Caches/Xamarin/mtbs/builds/HelloWorld_App1/3a576519-c6ad-44c0-8cc9-1398070db18b/source" "-lpjsip" "-force_load" "/Users/Admin/Library/Caches/Xamarin/mtbs/builds/HelloWorld_App1/3a576519-c6ad-44c0-8cc9-1398070db18b/source/libpjsip.a"

Posts

  • SebastienPouliotSebastienPouliot CAXamarin Team Xamurai

    @mrzond, I linked a basic application with the attached library and did not get any error. However my settings could be different.

    Could you file a bug report and attach a simple test case (solution w/source) that shows the error ?

    Please also include all versions of the software stack you're using. The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button).

Sign In or Register to comment.