2011-06-23 10 views
0

以下は私のビルドログです。どのように私はこれを修正することができる任意のアイデア?私はすべての通常のエラー定着液を試してみた:、フォルダを構築削除クリーニング、XCodeのを再起動する、など奇妙なビルドエラー:重複するシンボルcanVirate

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 -filelist /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 MediaPlayer -framework AVFoundation -framework MessageUI -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/SquirrelGame

ld: duplicate symbol _canVirate in /Users/Student/Desktop/SquirrelGame/build/SquirrelGame.build/Debug-iphonesimulator/SquirrelGame.build/Objects-normal/i386/SquirrelGameViewController.o and /Users/Student/Desktop/SquirrelGame/build/SquirrelGame.build/Debug-iphonesimulator/SquirrelGame.build/Objects-normal/i386/SquirrelGameAppDelegate.o collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 failed with exit code 1

答えて

0

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

SomeModule.h:

extern int canVirate; 

SomeModule.m:

int canVirate = 123; 
関連する問題