Usnig C++ and correct MTOUCH arguement: ERROR: Native linking error: library not found for -lgcc_eh

BamAziziBamAzizi USMember ✭✭
edited September 2016 in Xamarin.iOS

Hi there.

I need urgent help on this. Please comment if you have any clue/hint on this issue.
I have a binding of a static library (arm64) and added it as a reference to my single view iOS project but get an error related to clang++. I've tried different stuff on my additional mtouch argument (final one: --gcc_flags "-lstdc++ -dead_strip" -v -v -v -v
but I have an error (nightmare) :Native linking error: library not found for -lgcc_eh (I don't have any clue what is missing on my computer , do I need to update anything?)

please look at the full log in attachment

additional info:
sdk version 9.3
linker behaviour: Link ALL
disabled incremental builds

Appreciate your help

Partial log:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -framework UIKit -framework Foundation -framework CoreGraphics -weak_framework CFNetwork /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/libsmma_combo.a /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/libsmma.a /Library/Frameworks/Xamarin.iOS.framework/Versions/9.8.2.22/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libmonosgen-2.0.a /Library/Frameworks/Xamarin.iOS.framework/Versions/9.8.2.22/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libxamarin-debug.a /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/testface.exe.arm64.o /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/Xamarin.iOS.dll.arm64.o /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/mscorlib.dll.arm64.o /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/System.dll.arm64.o /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/bind1.dll.arm64.o /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/registrar.arm64.o /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/main.arm64.o -force_load /Library/Frameworks/Xamarin.iOS.framework/Versions/9.8.2.22/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libapp.a -licucore -lstdc++.6.0.9 -lgcc_eh -Wl,-pie -arch arm64 -miphoneos-version-min=9.3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -lz -o /Users/bam/Projects/bind1/testface/bin/iPhone/Debug/testface.app/testface -liconv -lstdc++ -dead_strip -u _UIApplicationMain -u _xamarin_release_managed_ref -u _xamarin_create_managed_ref -u _xamarin_get_block_descriptor -u _xamarin_timezone_get_data -u _xamarin_log -u _mono_pmip Process exited with code 1, command: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -framework UIKit -framework Foundation -framework CoreGraphics -weak_framework CFNetwork /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/libsmma_combo.a /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/libsmma.a /Library/Frameworks/Xamarin.iOS.framework/Versions/9.8.2.22/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libmonosgen-2.0.a /Library/Frameworks/Xamarin.iOS.framework/Versions/9.8.2.22/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libxamarin-debug.a /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/testface.exe.arm64.o /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/Xamarin.iOS.dll.arm64.o /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/mscorlib.dll.arm64.o /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/System.dll.arm64.o /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/bind1.dll.arm64.o /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/registrar.arm64.o /Users/bam/Projects/bind1/testface/obj/iPhone/Debug/mtouch-cache/main.arm64.o -force_load /Library/Frameworks/Xamarin.iOS.framework/Versions/9.8.2.22/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libapp.a -licucore -lstdc++.6.0.9 -lgcc_eh -Wl,-pie -arch arm64 -miphoneos-version-min=9.3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -lz -o /Users/bam/Projects/bind1/testface/bin/iPhone/Debug/testface.app/testface -liconv -lstdc++ -dead_strip -u _UIApplicationMain -u _xamarin_release_managed_ref -u _xamarin_create_managed_ref -u _xamarin_get_block_descriptor -u _xamarin_timezone_get_data -u _xamarin_log -u _mono_pmip ld: library not found for -lgcc_eh clang: error: linker command failed with exit code 1 (use -v to see invocation)

MTOUCH: error MT5209: Native linking error: library not found for -lgcc_eh MTOUCH: error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -lstdc++ -dead_strip MTOUCH: error MT5202: Native linking failed. Please review the build log. Task "MTouch" execution -- FAILED Done building target "_CompileToNative" in project "/Users/bam/Projects/bind1/testface/testface.csproj".-- FAILED

Done building project "/Users/bam/Projects/bind1/testface/testface.csproj".-- FAILED

Build FAILED.

Answers

Sign In or Register to comment.