0

以下は私のビルドログです。ビルドフォルダの削除、クリーニング、Xcodeの再起動など、通常のエラー修正ソリューションをすべて試しました。

Ld build / Debug-iphonesimulator / SquirrelGame.app / SquirrelGame normal i386 cd /Users/Student/Desktop/SquirrelGame 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/g++-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer /SDKs/iPhoneSimulator4.2.sdk -L / Users / Student / Desktop / SquirrelGame / build / Debug-iphonesimulator -F / Users / Student / Desktop / SquirrelGame / build / Debug-iphonesimulator -F / Users / Student / Desktop / SquirrelGame -ファイルリスト/Users/Student/Desktop/SquirrelGame/build/SquirrelGame.build/Debug-iphonesimulator/SquirrelGame.build/Objects-normal/i386/SquirrelGame.LinkFileList-mmacosx-version-min=10。6 -all_load -ObjC -Xlinker -objc_abi_version -Xlinker 2 -weak_framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AudioToolbox -framework CFNetwork -framework CoreLocation -weak_framework MapKit -framework QuartzCore -framework Security -framework SystemConfiguration -lsqlite3.0 -frameworkフレームワークAVFoundation-frameworkMessageUI -framework MobileCoreServices -framework AddressBook -framework AddressBookUI -weak_framework GameKit -lz.1.2.3 -framework OpenFeint -o /Users/Student/Desktop/SquirrelGame/build/Debug-iphonesimulator/SquirrelGame.app/SquirrelGameapp / SquirrelGameapp / SquirrelGame3フレームワークOpenFeint-o/Users/Student/Desktop/SquirrelGame/build/Debug-iphonesimulator/SquirrelGame.app/SquirrelGame3フレームワークOpenFeint-o/Users/Student/Desktop/SquirrelGame/build/Debug-iphonesimulator/SquirrelGame.app/SquirrelGame

ld:/Users/Student/Desktop/SquirrelGame/build/SquirrelGame.build/Debug-iphonesimulator/SquirrelGame.build/Objects-normal/i386/SquirrelGameViewController.oおよび/Users/Student/Desktop/SquirrelGame/build/でシンボル_canVirateを複製SquirrelGame.build/Debug-iphonesimulator/SquirrelGame.build/Objects-normal/i386/SquirrelGameAppDelegate.o collect2:ldが1つの終了ステータスを返しましたコマンド/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2が終了で失敗しましたコード1

4

1 に答える 1

0

コードなしで正確に言うのは難しいので、canVirateの定義を投稿してください。通常、このエラーは canVirate がヘッダー ファイルで定義されたグローバル変数であることを意味します。コンパイラは、ヘッダーを含むすべてのモジュールで変数を作成します。ヘッダーで canVirate を宣言する必要がありますが、SomeModule.m ファイルで定義する必要があります。

SomeModule.h:

extern int canVirate;

SomeModule.m:

int canVirate = 123;
于 2011-06-23T15:34:47.100 に答える