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
4

3 回答 3

2

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

 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

于 2012-03-12T14:02:53.717 回答
1

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

MonoTouch 不会尝试与 libgcc_s 链接,并且通过 搜索显示它看起来与 MonoTouch 根本无关。

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

于 2012-03-12T09:56:49.223 回答
0

上面的答案是正确的方法。同样的问题也发生在不同的项目上。最后我从 Snow Leopard 升级到 Lion,升级到最新的 xcode,现在一切正常。

于 2012-04-04T03:46:23.383 回答