Apple Mach-O链接器错误

时间:2015-01-06 08:56:36

标签: ios objective-c iphone xcode

大家好,我找到了很多答案,但没有得到解决方案。我在这里发布我的错误。请帮我摆脱这个。

Ld /Users/Rupesh/Library/Developer/Xcode/DerivedData/JEDI-fptiyjulpownybgfqknfffphqrvl/Build/Products/Debug-iphonesimulator/JEDI.app/JEDI normal i386
cd /Applications/XAMPP/xamppfiles/htdocs/bsharp/sites/default/iOS_Development/JEDI
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/Rupesh/Library/Developer/Xcode/DerivedData/JEDI-fptiyjulpownybgfqknfffphqrvl/Build/Products/Debug-iphonesimulator -F/Users/Rupesh/Library/Developer/Xcode/DerivedData/JEDI-fptiyjulpownybgfqknfffphqrvl/Build/Products/Debug-iphonesimulator -filelist /Users/Rupesh/Library/Developer/Xcode/DerivedData/JEDI-fptiyjulpownybgfqknfffphqrvl/Build/Intermediates/JEDI.build/Debug-iphonesimulator/JEDI.build/Objects-normal/i386/JEDI.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -Xlinker -dependency_info -Xlinker /Users/Rupesh/Library/Developer/Xcode/DerivedData/JEDI-fptiyjulpownybgfqknfffphqrvl/Build/Intermediates/JEDI.build/Debug-iphonesimulator/JEDI.build/Objects-normal/i386/JEDI_dependency_info.dat -o /Users/Rupesh/Library/Developer/Xcode/DerivedData/JEDI-fptiyjulpownybgfqknfffphqrvl/Build/Products/Debug-iphonesimulator/JEDI.app/JEDI

duplicate symbol _IS_ALREADY_LOGIN in:
/Users/Rupesh/Library/Developer/Xcode/DerivedData/JEDI-fptiyjulpownybgfqknfffphqrvl/Build/Intermediates/JEDI.build/Debug-iphonesimulator/JEDI.build/Objects-normal/i386/CustomCell.o
/Users/Rupesh/Library/Developer/Xcode/DerivedData/JEDI-fptiyjulpownybgfqknfffphqrvl/Build/Intermediates/JEDI.build/Debug-iphonesimulator/JEDI.build/Objects-normal/i386/ViewController.o
duplicate symbol _TRUE_CHECK in:
/Users/Rupesh/Library/Developer/Xcode/DerivedData/JEDI-fptiyjulpownybgfqknfffphqrvl/Build/Intermediates/JEDI.build/Debug-iphonesimulator/JEDI.build/Objects-normal/i386/CustomCell.o
/Users/Rupesh/Library/Developer/Xcode/DerivedData/JEDI-fptiyjulpownybgfqknfffphqrvl/Build/Intermediates/JEDI.build/Debug-iphonesimulator/JEDI.build/Objects-normal/i386/ViewController.o
duplicate symbol _FONT_NAME in:
/Users/Rupesh/Library/Developer/Xcode/DerivedData/JEDI-fptiyjulpownybgfqknfffphqrvl/Build/Intermediates/JEDI.build/Debug-iphonesimulator/JEDI.build/Objects-normal/i386/CustomCell.o
/Users/Rupesh/Library/Developer/Xcode/DerivedData/JEDI-fptiyjulpownybgfqknfffphqrvl/Build/Intermediates/JEDI.build/Debug-iphonesimulator/JEDI.build/Objects-normal/i386/ViewController.o
ld: 3 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个答案:

答案 0 :(得分:2)

您的项目包含重复的符号,这意味着您正在尝试编译两个包含同一类的实现的相同文件。检查项目文件并删除任何重复的.m文件(如CustomCell和ViewController)

在CustomCell.h / m和ViewController.h / m中,可能会多次定义_IS_ALREADY_LOGIN,_TRUE_CHECK等?