重复符号_OBJC_CLASS _ $ _ LoginController [英] Duplicate Symbol _OBJC_CLASS_$_LoginController

查看:126
本文介绍了重复符号_OBJC_CLASS _ $ _ LoginController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题之前已被问过多次,但现在还没有人解决我的问题。我知道当您在项目中获得多个文件副本时会发生此错误。
我试图清理构建,删除 Compile Sources 中的任何 LoginController.m 文件,然后构建。很好 - 没有错误。当我在Complie资源中添加我的LoginController.m文件时,编译器再次给出了相同的错误。

I know this Question has been asked many times before, but none has solved my problem uptill now. I know that this error occurs when you got multiple copies of your file in project. I tried to clean the build, delete any LoginController.m file in Compile Sources and then build. Fine - no errors. When I added my LoginController.m file in Complie resources, compiler again gave the same error.

接下来我尝试的是从Compile Sources中删除所有.m文件,成功清理和重建,并非常仔细地添加每个.m文件。同样的错误也被提出了。我没有找到任何重复的文件,那么为什么会发生这种情况呢?

Next I what I tried is delete all .m files from Compile Sources, clean and rebuild successfully, and added each .m file very carefully. Again same error has been raised. I did not find any duplicate file, then why the heck is this happening?

请有人指导我。非常感谢。

Please someone guide me. Thanks alot.

编辑:
错误是:

Error is:

Ld /Users/svp/Library/Developer/Xcode/DerivedData/TryAgain-dhbbyywxclvxfodbunqysmmfefcl/Build/Products/Debug-iphonesimulator/TryAgain.app/TryAgain normal i386
cd / Users / svp / Desktop / TryAgain
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/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L / Users / svp / Library / Developer / Xcode / DerivedData / TryAgain-dhbbyywxclvxfodbunqysmmfefcl / Build / Products / Debug-iphonesimulator -L / Users / svp / Desktop / TryAgain / TryAgain -L / Users / svp / Desktop / TryAgain /../ CorePlot_1。 0 / Binaries / iOS -F / Users / svp / Library / Developer / Xcode / DerivedData / TryAgain-dhbbyywxclvxfodbunqysmmfefcl / Build / Products / Debug-iphonesimula tor -filelist /Users/svp/Library/Developer/Xcode/DerivedData/TryAgain-dhbbyywxclvxfodbunqysmmfefcl/Build/Intermediates/TryAgain.build/Debug-iphonesimulator/TryAgain.build/Objects-normal/i386/TryAgain.LinkFileList -mmacosx-version- min = 10.6 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -all_load -fobjc-arc -D__IPHONE_OS_VERSION_MIN_REQUIRED = 50000 -framework MediaPlayer -lz -framework AVFoundation -framework MobileCoreServices -framework SystemConfiguration -framework CFNetwork -framework QuartzCore -framework UIKit -framework Foundation-framework CoreGraphics -lCorePlot-CocoaTouch -o /Users/svp/Library/Developer/Xcode/DerivedData/TryAgain-dhbbyywxclvxfodbunqysmmfefcl/Build/Products/Debug-iphonesimulator/TryAgain.app/TryAgain

ld:重复符号_OBJC_CLASS _ $ _ LoginController in /Users/svp/Library/Developer/Xcode/DerivedData/TryAgain-dhbbyywxclvxfodbunqysmmfefcl/Build/Intermediates/TryAgain.build/Debug- iphonesimulator / TryAgain.build /对象 - 正常/ I386 / LoginC ontroller.o和/Users/svp/Library/Developer/Xcode/DerivedData/TryAgain-dhbbyywxclvxfodbunqysmmfefcl/Build/Intermediates/TryAgain.build/Debug-iphonesimulator/TryAgain.build/Objects-normal/i386/Navigator.o for architecture i386
命令/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang失败,退出代码为1

推荐答案

您的错误消息表明从LoginController.m和Navigator.m创建的二进制文件定义了 LoginController 类的实现。有时会发生这种情况,因为共享头文件包含实现逻辑。检查Navigator.h / .m是否有对 LoginController 的引用。

Your error message says that the binaries created from both LoginController.m and Navigator.m define an implementation for your LoginController class. It sometimes happens that this is because of a shared header file that contains implementation logic. Check your Navigator.h/.m for references to a LoginController.

这篇关于重复符号_OBJC_CLASS _ $ _ LoginController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆