2

我尝试使用今天刚刚发布的 iPhone SDK 4 GM 构建我的(基于 cocos2d 0.99.0 的)项目。原因是我想在我的应用程序中加入 iAd。但是我收到了 20 条错误消息,看起来像是库调用中的错误。谁能告诉我我们是否真的可以使用 cocos2d 0.99.0?我知道 99.3 已发布,但他们没有提及任何 iOS 4 兼容性。

编辑:对不起,我不清楚。以下是错误消息:

    Ld build/Debug-iphonesimulator/FingerRide-1.app/FingerRide-1 normal i386
cd "/Users/monkey/Current/iPhone whatnots/FingerRide-1"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk "-L/Users/monkey/Current/iPhone whatnots/FingerRide-1/build/Debug-iphonesimulator" "-F/Users/monkey/Current/iPhone whatnots/FingerRide-1/build/Debug-iphonesimulator" -filelist "/Users/monkey/Current/iPhone whatnots/FingerRide-1/build/FingerRide-1.build/Debug-iphonesimulator/FingerRide-1.build/Objects-normal/i386/FingerRide-1.LinkFileList" -mmacosx-version-min=10.6 -all_load -ObjC -Xlinker -objc_abi_version -Xlinker 2 -framework CoreGraphics -framework Foundation -framework OpenGLES -framework QuartzCore -framework UIKit -framework AudioToolbox -framework OpenAL -lz -framework AVFoundation "-lcocos2d libraries" -o "/Users/monkey/Current/iPhone whatnots/FingerRide-1/build/Debug-iphonesimulator/FingerRide-1.app/FingerRide-1"

Undefined symbols:
  "_OBJC_CLASS_$_ZAttributeRun", referenced from:
      objc-class-ref-to-ZAttributeRun in libcocos2d libraries.a(FontLabelStringDrawing.o)
  ".objc_class_name_NSMutableArray", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSMutableArray in libcocos2d libraries.a(CJSONScanner.o)
      literal-pointer@__OBJC@__cls_refs@NSMutableArray in libcocos2d libraries.a(ZAttributedString.o)
      literal-pointer@__OBJC@__cls_refs@NSMutableArray in libcocos2d libraries.a(CCFileUtils.o)
  ".objc_class_name_NSObject", referenced from:
      .objc_class_name_CDataScanner in libcocos2d libraries.a(CDataScanner.o)
      .objc_class_name_CJSONDeserializer in libcocos2d libraries.a(CJSONDeserializer.o)
      .objc_class_name_CJSONSerializer in libcocos2d libraries.a(CJSONSerializer.o)
      .objc_class_name_ZAttributeRun in libcocos2d libraries.a(ZAttributedString.o)
      .objc_class_name_ZAttributedString in libcocos2d libraries.a(ZAttributedString.o)
      .objc_class_name_CCConfiguration in libcocos2d libraries.a(CCConfiguration.o)
      .objc_class_name_CCFileUtils in libcocos2d libraries.a(CCFileUtils.o)
  ".objc_class_name_NSString", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSString in libcocos2d libraries.a(CDataScanner.o)
      literal-pointer@__OBJC@__cls_refs@NSString in libcocos2d libraries.a(NSCharacterSet_Extensions.o)
      literal-pointer@__OBJC@__cls_refs@NSString in libcocos2d libraries.a(CJSONScanner.o)
      literal-pointer@__OBJC@__cls_refs@NSString in libcocos2d libraries.a(CJSONSerializer.o)
      literal-pointer@__OBJC@__cls_refs@NSString in libcocos2d libraries.a(ZAttributedString.o)
      literal-pointer@__OBJC@__cls_refs@NSString in libcocos2d libraries.a(CCConfiguration.o)
      literal-pointer@__OBJC@__cls_refs@NSString in libcocos2d libraries.a(CCFileUtils.o)
  ".objc_class_name_NSException", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSException in libcocos2d libraries.a(CDataScanner_Extensions.o)
      literal-pointer@__OBJC@__cls_refs@NSException in libcocos2d libraries.a(NSScanner_Extensions.o)
      literal-pointer@__OBJC@__cls_refs@NSException in libcocos2d libraries.a(CJSONSerializer.o)
      literal-pointer@__OBJC@__cls_refs@NSException in libcocos2d libraries.a(ZAttributedString.o)
  ".objc_class_name_NSMutableString", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSMutableString in libcocos2d libraries.a(CJSONScanner.o)
      literal-pointer@__OBJC@__cls_refs@NSMutableString in libcocos2d libraries.a(CJSONSerializer.o)
  ".objc_class_name_NSArray", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSArray in libcocos2d libraries.a(CJSONSerializer.o)
  ".objc_class_name_NSDictionary", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSDictionary in libcocos2d libraries.a(CJSONScanner.o)
      literal-pointer@__OBJC@__cls_refs@NSDictionary in libcocos2d libraries.a(CJSONSerializer.o)
      literal-pointer@__OBJC@__cls_refs@NSDictionary in libcocos2d libraries.a(ZAttributedString.o)
  ".objc_class_name_NSAssertionHandler", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSAssertionHandler in libcocos2d libraries.a(ZAttributedString.o)
      literal-pointer@__OBJC@__cls_refs@NSAssertionHandler in libcocos2d libraries.a(CCConfiguration.o)
  "_OBJC_CLASS_$_CCFileUtils", referenced from:
      objc-class-ref-to-CCFileUtils in libcocos2d libraries.a(CCBitmapFontAtlas.o)
      objc-class-ref-to-CCFileUtils in libcocos2d libraries.a(CCSpriteFrameCache.o)
      objc-class-ref-to-CCFileUtils in libcocos2d libraries.a(CCTextureCache.o)
      objc-class-ref-to-CCFileUtils in libcocos2d libraries.a(CCTileMapAtlas.o)
      objc-class-ref-to-CCFileUtils in libcocos2d libraries.a(CCTMXXMLParser.o)
  "_OBJC_CLASS_$_ZAttributedString", referenced from:
      l_OBJC_$_CATEGORY_ZAttributedString_$_ZAttributedStringDrawing in libcocos2d libraries.a(FontLabelStringDrawing.o)
      objc-class-ref-to-ZAttributedString in libcocos2d libraries.a(FontLabelStringDrawing.o)
  "_OBJC_CLASS_$_CJSONDeserializer", referenced from:
      objc-class-ref-to-CJSONDeserializer in libcocos2d libraries.a(CLScoreServerRequest.o)
  ".objc_class_name_NSError", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSError in libcocos2d libraries.a(CJSONDeserializer.o)
      literal-pointer@__OBJC@__cls_refs@NSError in libcocos2d libraries.a(CJSONScanner.o)
  ".objc_class_name_NSMutableDictionary", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSMutableDictionary in libcocos2d libraries.a(CJSONScanner.o)
      literal-pointer@__OBJC@__cls_refs@NSMutableDictionary in libcocos2d libraries.a(ZAttributedString.o)
  ".objc_class_name_NSCharacterSet", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSCharacterSet in libcocos2d libraries.a(CDataScanner.o)
      literal-pointer@__OBJC@__cls_refs@NSCharacterSet in libcocos2d libraries.a(CDataScanner_Extensions.o)
      literal-pointer@__OBJC@__cls_refs@NSCharacterSet in libcocos2d libraries.a(NSCharacterSet_Extensions.o)
      literal-pointer@__OBJC@__cls_refs@NSCharacterSet in libcocos2d libraries.a(NSScanner_Extensions.o)
  "_OBJC_CLASS_$_CCConfiguration", referenced from:
      objc-class-ref-to-CCConfiguration in libcocos2d libraries.a(FontManager.o)
      objc-class-ref-to-CCConfiguration in libcocos2d libraries.a(CCTexture2D.o)
  ".objc_class_name_NSBundle", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSBundle in libcocos2d libraries.a(CCConfiguration.o)
  ".objc_class_name_NSData", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSData in libcocos2d libraries.a(CDataScanner.o)
      literal-pointer@__OBJC@__cls_refs@NSData in libcocos2d libraries.a(CJSONSerializer.o)
  ".objc_class_name_NSNumber", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSNumber in libcocos2d libraries.a(CDataScanner.o)
      literal-pointer@__OBJC@__cls_refs@NSNumber in libcocos2d libraries.a(CJSONScanner.o)
      literal-pointer@__OBJC@__cls_refs@NSNumber in libcocos2d libraries.a(CJSONSerializer.o)
      literal-pointer@__OBJC@__cls_refs@NSNumber in libcocos2d libraries.a(ZAttributedString.o)
  ".objc_class_name_NSNull", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSNull in libcocos2d libraries.a(CJSONScanner.o)
      literal-pointer@__OBJC@__cls_refs@NSNull in libcocos2d libraries.a(CJSONSerializer.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
4

3 回答 3

2

从人们告诉我的和我自己的实验来看,一个干净的构建可以解决这个问题。也许你也可以尝试更新 cocos2d。

于 2010-07-13T08:37:16.113 回答
0

这可能是在黑暗中开枪......但它以前伤害过我。尝试从“iphone whatnot”目录中删除空间

于 2010-06-15T03:12:11.490 回答
0

看起来您的项目中可能缺少一些框架,例如 Foundation 或 CoreFoundation。

于 2010-06-22T18:07:00.460 回答