MonoTouch第三方图书馆适用于4.2,但不适用于5.0



我有一个第三方库,我终于在MonoTouch应用程序中使用了它。然而,只有当我将SDK设置为4.2时,它才会为模拟器进行编译。如果我将其设置为5.0,链接器将失败。它将编译到实际设备的5.0。它所要求的gcc_s.10.5是什么?它应该位于哪里?

Generated /var/folders/GG/GG6dZ9dzFX0vYZmJ1+6pQ++++TI/-Tmp-/tmp6a32a243.tmp/main.m
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -gdwarf-2 -fobjc-legacy-dispatch -fobjc-abi-version=2 -miphoneos-version-min=5.0 -arch i386  -std=c99 -I/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/include -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -c /var/folders/GG/GG6dZ9dzFX0vYZmJ1+6pQ++++TI/-Tmp-/tmp6a32a243.tmp/main.m -o /var/folders/GG/GG6dZ9dzFX0vYZmJ1+6pQ++++TI/-Tmp-/tmp6a32a243.tmp/main.x86.o -DDEBUG  
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -gdwarf-2 -fobjc-legacy-dispatch -fobjc-abi-version=2 -miphoneos-version-min=5.0   -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk /var/folders/GG/GG6dZ9dzFX0vYZmJ1+6pQ++++TI/-Tmp-/tmp6a32a243.tmp/main.x86.o -o /var/folders/GG/GG6dZ9dzFX0vYZmJ1+6pQ++++TI/-Tmp-/tmp6a32a243.tmp/RetailStuff -framework CFNetwork -framework Foundation -framework UIKit -framework SystemConfiguration -framework CoreFoundation -framework CoreGraphics -framework AudioToolbox -framework AVFoundation -framework ExternalAccessory -framework QuartzCore -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/GG/GG6dZ9dzFX0vYZmJ1+6pQ++++TI/-Tmp-/tmp6a32a243.tmp/libGrabbaDriver.a
Process exited with code 1, command:
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -gdwarf-2 -fobjc-legacy-dispatch -fobjc-abi-version=2 -miphoneos-version-min=5.0   -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk /var/folders/GG/GG6dZ9dzFX0vYZmJ1+6pQ++++TI/-Tmp-/tmp6a32a243.tmp/main.x86.o -o /var/folders/GG/GG6dZ9dzFX0vYZmJ1+6pQ++++TI/-Tmp-/tmp6a32a243.tmp/RetailStuff -framework CFNetwork -framework Foundation -framework UIKit -framework SystemConfiguration -framework CoreFoundation -framework CoreGraphics -framework AudioToolbox -framework AVFoundation -framework ExternalAccessory -framework QuartzCore -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/GG/GG6dZ9dzFX0vYZmJ1+6pQ++++TI/-Tmp-/tmp6a32a243.tmp/libGrabbaDriver.a
ld: library not found for -lgcc_s.10.5
collect2: ld returned 1 exit status
mtouch exited with code 1

libgcc_s很可能是链接MonoTouch项目的libGrabbaDriver.a的依赖项。

 ld: library not found for -lgcc_s.10.5

该库的名称可能已更改,即在我的iOS 5.1系统上不相同。

 /Applications//Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/libgcc_s.1.dylib

从那里我想你需要:

  • 将您的应用程序与较新的库链接(希望没有内部更改);

  • 重建本机库,使其与正确(更新)版本的libgcc_s 链接

看起来您的系统处于不一致的状态。

MonoTouch并不试图与libgcc_s链接,谷歌搜索显示它看起来与MonoTouch根本没有关联。

我会尝试再次卸载并重新安装Xcode(您可能也必须再次安装MonoTouch,因为Xcode在某些情况下可能会删除它):

上面的答案是正确的。同样的问题也发生在另一个项目上。最后,我从雪豹升级到了狮子,升级到了最新的xcode,现在一切都好了。

相关内容

  • 没有找到相关文章

最新更新