如何解决这个错误?

时间:2011-06-17 04:18:38

标签: iphone

我开发了一个应用程序。根据我的要求,我使用Twitter + OAuth共享twitter.Iam在IOS 3.1.3中开发我的应用程序。我遇到了错误,如

  Undefined symbols:
      ".objc_class_name_OAMutableURLRequest", referenced from:
          literal-pointer@__OBJC@__cls_refs@OAMutableURLRequest in SA_OAuthTwitterEngine.o
      ".objc_class_name_OARequestParameter", referenced from:
          literal-pointer@__OBJC@__cls_refs@OARequestParameter in SA_OAuthTwitterEngine.o
      "_OBJC_CLASS_$_NSMutableURLRequest", referenced from:
          _OBJC_CLASS_$_OAMutableURLRequest in libOAuth.a(OAMutableURLRequest.o)
      "_OBJC_CLASS_$_NSMutableArray", referenced from:
          __objc_classrefs__DATA@0 in libOAuth.a(OAMutableURLRequest.o)
      "_OBJC_CLASS_$_NSURL", referenced from:
          __objc_classrefs__DATA@0 in libOAuth.a(OAMutableURLRequest.o)
      ".objc_class_name_OADataFetcher", referenced from:
          literal-pointer@__OBJC@__cls_refs@OADataFetcher in SA_OAuthTwitterEngine.o
      "_OBJC_METACLASS_$_NSMutableURLRequest", referenced from:
          _OBJC_METACLASS_$_OAMutableURLRequest in libOAuth.a(OAMutableURLRequest.o)
      "__objc_empty_vtable", referenced from:
          _OBJC_METACLASS_$_OAMutableURLRequest in libOAuth.a(OAMutableURLRequest.o)
          _OBJC_CLASS_$_OAMutableURLRequest in libOAuth.a(OAMutableURLRequest.o)
          _OBJC_METACLASS_$_OARequestParameter in libOAuth.a(OARequestParameter.o)
          _OBJC_CLASS_$_OARequestParameter in libOAuth.a(OARequestParameter.o)
          _OBJC_METACLASS_$_OADataFetcher in libOAuth.a(OADataFetcher.o)
          _OBJC_CLASS_$_OADataFetcher in libOAuth.a(OADataFetcher.o)
          _OBJC_METACLASS_$_OAConsumer in libOAuth.a(OAConsumer.o)
          _OBJC_CLASS_$_OAConsumer in libOAuth.a(OAConsumer.o)
          _OBJC_METACLASS_$_OAToken in libOAuth.a(OAToken.o)
          _OBJC_CLASS_$_OAToken in libOAuth.a(OAToken.o)
          _OBJC_METACLASS_$_OAServiceTicket in libOAuth.a(OAServiceTicket.o)
          _OBJC_CLASS_$_OAServiceTicket in libOAuth.a(OAServiceTicket.o)
          _OBJC_METACLASS_$_OAHMAC_SHA1SignatureProvider in libOAuth.a(OAHMAC_SHA1SignatureProvider.o)
          _OBJC_CLASS_$_OAHMAC_SHA1SignatureProvider in libOAuth.a(OAHMAC_SHA1SignatureProvider.o)
      "_OBJC_CLASS_$_NSMutableString", referenced from:
          __objc_classrefs__DATA@0 in libOAuth.a(OAMutableURLRequest.o)
      "_OBJC_METACLASS_$_NSObject", referenced from:
          _OBJC_METACLASS_$_OAMutableURLRequest in libOAuth.a(OAMutableURLRequest.o)
          _OBJC_METACLASS_$_OARequestParameter in libOAuth.a(OARequestParameter.o)
          _OBJC_METACLASS_$_OARequestParameter in libOAuth.a(OARequestParameter.o)
          _OBJC_METACLASS_$_OADataFetcher in libOAuth.a(OADataFetcher.o)
          _OBJC_METACLASS_$_OADataFetcher in libOAuth.a(OADataFetcher.o)
          _OBJC_METACLASS_$_OAConsumer in libOAuth.a(OAConsumer.o)
          _OBJC_METACLASS_$_OAConsumer in libOAuth.a(OAConsumer.o)
          _OBJC_METACLASS_$_OAToken in libOAuth.a(OAToken.o)
          _OBJC_METACLASS_$_OAToken in libOAuth.a(OAToken.o)
          _OBJC_METACLASS_$_OAServiceTicket in libOAuth.a(OAServiceTicket.o)
          _OBJC_METACLASS_$_OAServiceTicket in libOAuth.a(OAServiceTicket.o)
          _OBJC_METACLASS_$_OAHMAC_SHA1SignatureProvider in libOAuth.a(OAHMAC_SHA1SignatureProvider.o)
          _OBJC_METACLASS_$_OAHMAC_SHA1SignatureProvider in libOAuth.a(OAHMAC_SHA1SignatureProvider.o)
      ".objc_class_name_OAConsumer", referenced from:
          literal-pointer@__OBJC@__cls_refs@OAConsumer in SA_OAuthTwitterEngine.o
      "_OBJC_CLASS_$_NSObject", referenced from:
          _OBJC_CLASS_$_OARequestParameter in libOAuth.a(OARequestParameter.o)
          _OBJC_CLASS_$_OADataFetcher in libOAuth.a(OADataFetcher.o)
          _OBJC_CLASS_$_OAConsumer in libOAuth.a(OAConsumer.o)
          _OBJC_CLASS_$_OAToken in libOAuth.a(OAToken.o)
          _OBJC_CLASS_$_OAServiceTicket in libOAuth.a(OAServiceTicket.o)
          _OBJC_CLASS_$_OAHMAC_SHA1SignatureProvider in libOAuth.a(OAHMAC_SHA1SignatureProvider.o)
      "_OBJC_CLASS_$_NSURLConnection", referenced from:
          __objc_classrefs__DATA@0 in libOAuth.a(OADataFetcher.o)
      "_objc_msgSendSuper2", referenced from:
          -[OAMutableURLRequest dealloc] in libOAuth.a(OAMutableURLRequest.o)
          -[OAMutableURLRequest initWithURL:consumer:token:realm:signatureProvider:nonce:timestamp:] in libOAuth.a(OAMutableURLRequest.o)
          -[OAMutableURLRequest initWithURL:consumer:token:realm:signatureProvider:] in libOAuth.a(OAMutableURLRequest.o)
          -[OARequestParameter dealloc] in libOAuth.a(OARequestParameter.o)
          -[OARequestParameter initWithName:value:] in libOAuth.a(OARequestParameter.o)
          -[OAConsumer dealloc] in libOAuth.a(OAConsumer.o)
          -[OAConsumer initWithKey:secret:] in libOAuth.a(OAConsumer.o)
          -[OAToken dealloc] in libOAuth.a(OAToken.o)
          -[OAToken initWithUserDefaultsUsingServiceProviderName:prefix:] in libOAuth.a(OAToken.o)
          -[OAToken initWithKey:secret:] in libOAuth.a(OAToken.o)
          -[OAToken init] in libOAuth.a(OAToken.o)
          -[OAToken initWithHTTPResponseBody:] in libOAuth.a(OAToken.o)
          -[OAServiceTicket dealloc] in libOAuth.a(OAServiceTicket.o)
          -[OAServiceTicket initWithRequest:response:didSucceed:] in libOAuth.a(OAServiceTicket.o)
      "_OBJC_CLASS_$_NSString", referenced from:
          __objc_classrefs__DATA@0 in libOAuth.a(OAMutableURLRequest.o)
          __objc_classrefs__DATA@0 in libOAuth.a(OARequestParameter.o)
          __objc_classrefs__DATA@0 in libOAuth.a(OAToken.o)
          __objc_classrefs__DATA@0 in libOAuth.a(OAHMAC_SHA1SignatureProvider.o)
      "_OBJC_CLASS_$_NSData", referenced from:
          __objc_classrefs__DATA@0 in libOAuth.a(OAHMAC_SHA1SignatureProvider.o)
      ".objc_class_name_OAToken", referenced from:
          literal-pointer@__OBJC@__cls_refs@OAToken in SA_OAuthTwitterEngine.o
      "_OBJC_CLASS_$_NSUserDefaults", referenced from:
          __objc_classrefs__DATA@0 in libOAuth.a(OAToken.o)
    ld: symbol(s) not found
    collect2: ld returned 1 exit status

所以请帮我解决这个错误。

1 个答案:

答案 0 :(得分:1)

您尚未在项目中添加oAuth库。添加应该存在于API提供的演示应用程序中的库,然后重试。