-6

嘿伙计们,我正在尝试构建我的应用程序,但链接时它并没有停止?奇怪的错误是日志

ld /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator/SearchPRO.app/SearchPRO normal i386 cd /Users/alyjamy/Downloads/SearchPRO setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv 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 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/ SDKs/iPhoneSimulator5.1。sdk -L/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator -F/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/ Debug-iphonesimulator -filelist /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/SearchPRO.LinkFileList -mmacosx-版本-min = 10。6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -lxml2 -lz -framework MobileCoreServices -framework SystemConfiguration -framework CoreGraphics -framework CFNetwork -framework UIKit -framework Foundation -o /Users/alyjamy /Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator/SearchPRO.app/SearchPRO

重复符号 _OBJC_IVAR_$_Google_SearchView.refParentViewController 在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView- F440D65BB38D9558.o /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-41A2B8A23D2A1652.o 重复符号_OBJC $_Google_SearchView 在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-F440D65BB38D9558。o /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-41A2B8A23D2A1652.o 重复符号_OBJC_METACLASS_$_Google_SearchView在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-F440D65BB38D9558.o /Users/alyjamy /Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-41A2B8A23D2A1652.o重复符号_OBJC_IVAR_$_HomeView.refParentViewController:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/HomeView-5DC4F3DA47F5C55B.o /Users/alyjamy/Library /Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/HomeView-B126BFA53128822A.o 重复符号_OBJC_CLASS_$_HomeView 在:/Users/alyjamy/ Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/HomeView-5DC4F3DA47F5C55B.o /Users/alyjamy/Library/Developer/Xcode/ DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO。build/Objects-normal/i386/HomeView-B126BFA53128822A.o 重复符号 _OBJC_METACLASS_$_HomeView 在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO .build/Objects-normal/i386/HomeView-5DC4F3DA47F5C55B.o /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal /i386/HomeView-B126BFA53128822A.o 重复符号_main 在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/ i386/main-90B20DF7C3920B56.o 重复符号 _OBJC_IVAR_$_iSearchProAppDelegate.navigationController 在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-FC941BF9786A1D61.o /Users/alyjamy/Library /Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-5039F6A504D7A3A.o 重复符号 _OBJC_IVAR_$_iSearchProAppDelegate.window 在:/Users/ alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-FC941BF9786A1D61。o /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-5039F6A504D7A3A.o 重复符号_OBJC_CLASS_$_iSearchProAppDelegate在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-FC941BF9786A1D61.o /Users/alyjamy /Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-5039F6A504D7A3A.o 重复符号_OBJC_METACLASS_$_iSearchProAppDelegate 在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-FC941BF9786A1D61.o /Users/alyjamy/Library /Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-5039F6A504D7A3A.o 重复符号 _OBJC_IVAR_$_Twitter_SearchView.refParentViewController 在:/Users/ alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchView-3920747535A2AD6A。o /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchView-F6065DBEB33D9A3C.o 重复符号_OBJC_CLASS_$_Twitter_SearchView在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchView-3920747535A2AD6A.o /Users/alyjamy /Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchView-F6065DBEB33D9A3C.o 重复符号_OBJC_METACLASS_$_Twitter_SearchView 在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchView-3920747535A2AD6A.o /Users/alyjamy/Library /Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchView-F6065DBEB33D9A3C.o重复符号_OBJC_CLASS_$_Twitter_SearchViewController在:/Users/alyjamy/库/开发人员/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchViewController-2A2332C99892CD6C。o /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchViewController-E7091C13162DBA3E.o 重复符号_OBJC_METACLASS_$_Twitter_SearchViewController在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchViewController-2A2332C99892CD6C.o /Users/alyjamy /Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchViewController-E7091C13162DBA3E.o 重复符号_OBJC_IVAR_$_Youtube_SearchView.refParentViewController 在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchView-1B25F11DFB82ED6E.o /Users/alyjamy/Library /Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchView-FE4CD6F8B0DC7B2A.o 重复符号_OBJC_CLASS_$_Youtube_SearchView 在:/Users/alyjamy/ Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchView-1B25F11DFB82ED6E.o /Users/alyjamy/Library/Developer/Xcode/ DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO。build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchView-FE4CD6F8B0DC7B2A.o 重复符号 _OBJC_METACLASS_$_Youtube_SearchView 在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO .build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchView-1B25F11DFB82ED6E.o /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator /SearchPRO.build/Objects-normal/i386/Youtube_SearchView-FE4CD6F8B0DC7B2A.o 重复符号 _OBJC_CLASS_$_Youtube_SearchViewController 在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug- iphonesimulator/SearchPRO。build/Objects-normal/i386/Youtube_SearchViewController-3269AC039631AE5A.o /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/ i386/Youtube_SearchViewController-EF4F954D13CC9B2C.o 重复符号 _OBJC_METACLASS_$_Youtube_SearchViewController 在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal /i386/Youtube_SearchViewController-3269AC039631AE5A.o /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchViewController-EF4F954D13CC9B2C 。老的:架构 i386 clang 的 21 个重复符号:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

你能帮我吗

当我删除重复项时解决了这个错误现在我有了它

ld /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator/SearchPRO.app/SearchPRO normal i386 cd /Users/alyjamy/Downloads/SearchPRO setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv 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 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/ SDKs/iPhoneSimulator5.1。sdk -L/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator -F/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/ Debug-iphonesimulator -filelist /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/SearchPRO.LinkFileList -Xlinker - -no-demangle -mmacosx-version-min=10。6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -lxml2 -lz -framework MobileCoreServices -framework SystemConfiguration -framework CoreGraphics -framework CFNetwork -framework UIKit -framework Foundation -o /Users/alyjamy /Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator/SearchPRO.app/SearchPRO

重复符号_main在:/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/main-AC1E3FF737776656.o ld :架构 i386 clang 的 1 个重复符号:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

??

4

1 回答 1

2

Youtube_SearchViewController.m和其他Youtube_SearchView.m文件在“编译源”构建阶段列出了两次。

在左侧的 Project Navigator 中选择您的项目,然后在目标列表中选择您的目标,转到“Build Phases”选项卡,然后删除每个重复文件(这样每个 .m 文件只列出一次)。


有关如何解释构建日志的详细信息(重点添加和重新格式化)

重复符号_OBJC_IVAR_$_ Google_SearchView.refParentViewController在:

  • /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-F440D65BB38D9558.o _
  • /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-41A2B8A23D2A1652.o _

在上面的摘录中,Google_searchView.m被编译了两次,同时产生了Google_SearchView-F440D65BB38D9558.oGoogle_SearchView-41A2B8A23D2A1652.o

于 2012-09-18T13:09:15.157 回答