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)
仅当我尝试在模拟器中构建时(在我可以无错误构建的任何 iOS 设备上)时,我才在 xcode 中收到上述错误。我有三个班级:
1.LTGlobalResultsViewController 2.LTJumpToMeViewController 3.LTJumpToPositionViewController
这三个都是在 xcode 中创建的,但是 2 和 3 都在 xcode 之外进行了修改,然后重新构建。
@property bool LeagueTableLoaded 在所有三个的标题中定义。它被声明为:
@property bool leagueTableLoaded;
究竟是什么导致了这个错误?我尝试了以下方法:
我曾尝试在不同的类中重命名leagueTableLoaded,但这并不能解决它。
我尝试在 library/developer/xcode 文件夹中手动删除我的派生数据文件。
根据其他问题,我检查了是否要导入 .m 文件。不是这种情况。Apple Mach-O 链接器错误(“重复符号”)
还有其他建议或建议吗?谢谢,詹姆斯
补充:根据要求,请从我的 .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;
如果需要,我可以提供更多信息!