duplicate symbol _leagueTableLoaded in:
/Users/Brendan/Library/Developer/Xcode/DerivedData/2013-dbhrwzgxgwhfbqatgqpfrmqyucyu/Build/Intermediates/2013.build/Debug-iphonesimulator/2013.build/Objects-normal/i386/LTGlobalResultsViewController.o
/Users/Brendan/Library/Developer/Xcode/DerivedData/2013-dbhrwzgxgwhfbqatgqpfrmqyucyu/Build/Intermediates/2013.build/Debug-iphonesimulator/2013.build/Objects-normal/i386/LTJumpToMeViewController.o
duplicate symbol _showGLobalCompany in:
/Users/Brendan/Library/Developer/Xcode/DerivedData/2013-dbhrwzgxgwhfbqatgqpfrmqyucyu/Build/Intermediates/2013.build/Debug-iphonesimulator/2013.build/Objects-normal/i386/LTGlobalResultsViewController.o
/Users/Brendan/Library/Developer/Xcode/DerivedData/2013-dbhrwzgxgwhfbqatgqpfrmqyucyu/Build/Intermediates/2013.build/Debug-iphonesimulator/2013.build/Objects-normal/i386/LTJumpToPositionViewController.o
duplicate symbol _leagueTableLoaded in:
/Users/Brendan/Library/Developer/Xcode/DerivedData/2013-dbhrwzgxgwhfbqatgqpfrmqyucyu/Build/Intermediates/2013.build/Debug-iphonesimulator/2013.build/Objects-normal/i386/LTGlobalResultsViewController.o
/Users/Brendan/Library/Developer/Xcode/DerivedData/2013-dbhrwzgxgwhfbqatgqpfrmqyucyu/Build/Intermediates/2013.build/Debug-iphonesimulator/2013.build/Objects-normal/i386/LTJumpToPositionViewController.o
ld: 3 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我得到上述錯誤在Xcode只有當我嘗試在模擬器建(任何iOS設備,我可以建立一個沒有錯誤的)。我有三類:的Xcode錯誤「重複的符號」,導致蘋果的Mach-O連接錯誤
1.LTGlobalResultsViewController 2.LTJumpToMeViewController 3.LTJumpToPositionViewController
三人都在Xcode中創建的,但二者2 & 3已被修改的Xcode外面再重建。
@property bool leagueTableLoaded在所有三個標題中定義。它被宣佈爲:
@property bool leagueTableLoaded;
究竟是什麼造成了這個錯誤?我試過以下內容:
我試過在不同的類中重命名leagueTableLoaded,但是這並不能解決它。
我試過在庫/開發人員/ xcode文件夾中手動刪除我的派生數據文件。
根據其他問題,我檢查了是否導入.m文件。不是這種情況。 Apple Mach-O Linker error ("duplicate symbol")
其他建議或意見? 謝謝, 詹姆斯
增加:按要求請找出所有從我的.h和.m文件引用leagueTableLoaded或任何試圖避開這個錯誤,當我創建變體的提取物:
LTJumpToMeViewController.h
@property bool leagueTableLoadedMe;
LTJumpToMeViewController.m
@implementation LTJumpToMeViewController
bool leagueTableLoaded = false;
LTGlobalResultsViewController.h
@property bool globalLeagueTableLoaded;
LTGlobalResultsViewController.m
@implementation LTGlobalResultsViewController
bool leagueTableLoaded = false;
LTJumpToPositionViewController.h
@property bool leagueTableLoadedPos;
LTJumpToPositionViewController.m
@implementation LTJumpToPositionViewController
bool leagueTableLoaded = false;
如果需要,我可以提供更多信息!
請顯示聲明這些屬性(或至少其中之一)的頭文件。 – trojanfoe
在問題主體中更新。謝謝 – JamesLCQ
這還不足以解決這個問題。請轉到命令提示符並切換到您的項目目錄並輸入'find。 -type f -exec grep leagueTableLoaded {} \;'並在這裏發佈輸出。 – trojanfoe