0

さて、更新、私は今、次のエラーを受け取っています、助けてください!

Ld build / Debug-iphonesimulator / Test.app / Test normal i386 cd / Users / rahulvarshney / Documents / newbieC / 956Family / 956Family / iphone-twitter / Example 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.1.sdk -L / Users / rahulvarshney / Documents / newbieC / 956Family / 956Family / iphone-twitter / Example / build / Debug-iphonesimulator -L / Developer / Platforms /iPhoneOS.platform/DeviceSupport/4.0。2 / Symbols / usr / lib -F / Users / rahulvarshney / Documents / newbieC / 956Family / 956Family / iphone-twitter / Example / build / Debug-iphonesimulator -filelist / Users / rahulvarshney / Documents / newbieC / 956Family / 956Family / iphone- twitter / Example / build / Test.build / Debug-iphonesimulator / Test.build / Objects-normal / i386 / Test.LinkFileList -mmacosx-version-min = 10.6 -Xlinker -objc_abi_version -Xlinker 2 /Developer/Platforms/iPhoneSimulator.platform /Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework /UIKit/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics-licucore。A -o /Users/rahulvarshney/Documents/newbieC/956Family/956Family/iphone-twitter/Example/build/Debug-iphonesimulator/Test.app/Test

ld:警告:/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0.2/Symbols/usr/lib/libicucore.A.dylibにあり、ファイルld:警告:/ Developer / Platforms/iPhoneOSに必要なアーキテクチャi386がありません。 platform / DeviceSupport / 4.0.2 / Symbols / usr / lib / libSystem.dylib、ファイルld:/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0.2/Symbols/usr/lib/libobjcに必要なアーキテクチャi386がありません。 A.dylib、ファイルcollect2に必要なアーキテクチャi386がありません:ldが1の終了ステータスを返しましたコマンド/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2が終了コード1で失敗しました

どなたかお願いします。ヘルプ!

元の投稿

こんにちは、私は単に次のAPIに含まれているテストプログラムを実行しようとしています: https ://github.com/st3fan/iphone-twitter

コンパイル時にこのエラーが発生します:

エラー:「URLShortener」の前に「)」が必要です

これは、TwitterComposeViewController.mの75行目からのものです。これは次の行です。

- (void) shortener: (URLShortener*) shortener didSucceedWithShortenedURL: (NSURL*) shortenedURL
{
 // Replace the first URL in the message. This is terrible code that needs to be replaced with a proper regular expression.

 NSMutableString* message = [NSMutableString string];

 for (NSString* word in [_message componentsSeparatedByCharactersInSet: [NSCharacterSet whitespaceCharacterSet]]) {
  if ([word hasPrefix: @"http://"] || [word hasPrefix: @"https://"]) {
   [message appendString: @" "];
   [message appendString: [shortenedURL absoluteString]];
  } else {
   [message appendString: @" "];
   [message appendString: word];
  }
 }

 _textView.text = message;
 [self updateCharactersLeftLabel];

 [self _showComposeForm];
 [self _hideStatus];
}

私はn00bieですので、事前にお詫び申し上げます。どんな助けでもありがたいです、

ありがとう、

ラフル

4

2 に答える 2

0

通常、このエラーのような問題が発生した場合:自分のアプリで「前に」が報告された場合、それは、その.mファイルに必要なヘッダーファイルの一部をインポートするのを忘れたためです。

したがって、コードをチェックして、天気「URLShortener.h」(またはそのようなもの)が正しくインポートされたかどうかを確認することをお勧めします。

于 2010-12-19T07:44:30.313 に答える
0

私はそのコードの作者です。混乱して申し訳ありません。ドキュメントを更新する必要があります。

次の 2 つのことを行う必要があります。

まず、ターゲット設定で TWITTER_USE_URLSHORTENER を定義します。

次に、https://github.com/st3fan/iphone-bitlyをダウンロードして、それらのソースをプロジェクトに含めます。

于 2010-12-19T19:32:07.423 に答える