我有一个第三方库,我终于在我的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
答案 0 :(得分:2)
libgcc_s
可能是libGrabbaDriver.a
的依赖关系,您将MonoTouch项目链接到。{/ p>
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
的正确(较新)版本
答案 1 :(得分:1)
看起来您的系统处于不一致状态。
MonoTouch不会尝试与libgcc_s链接,bit of googling表示它看起来与MonoTouch无关。
我会尝试再次卸载并重新安装Xcode(您可能还需要再次安装MonoTouch,因为在某些情况下Xcode可能会删除它):
答案 2 :(得分:0)
上面的答案是正确的方法。同样的问题也发生在不同的项目上。最后我从Snow Leopard升级到Lion,升级到最新的xcode,现在一切正常。