【发布时间】:2012-05-15 23:35:08
【问题描述】:
我刚刚通过向我的一些 nib 和 .m 文件添加本地化功能将我的整个应用程序翻译成另一种语言,完成后我尝试运行该应用程序,但出现以下错误。
Ld “/Users/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Products/Debug-iphonesimulator/MDH Schedule.app/MDH Schedule”正常i386 cd
"/Users/tenghamn/Dropbox/xcode Projects/scheduleTable" setenv MACOSX_DEPLOYMENT_TARGET 10.6 设置环境路径 "/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/iPhoneSimulator5.1.sdk
-L/Users/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Products/Debug-iphonesimulator
-F/Users/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Products/Debug-iphonesimulator
-filelist "/Users/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Intermediates/scheduleTable.build/Debug-iphonesimulator/scheduleTable.build/Objects-normal/i386/MDH
Schedule.LinkFileList" -mmacosx-version-min=10.6 -Xlinker
-objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework SystemConfiguration -framework QuartzCore -framework CoreData -framework UIKit -framework Foundation -framework CoreGraphics -o
"/Users/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Products/Debug-iphonesimulator/MDH Schedule.app/MDH Schedule"
ld:重复符号 _OBJC_CLASS__$_MainViewController 在 /Users/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Intermediates/scheduleTable.build/Debug-iphonesimulator/scheduleTable.build/Objects-normal/i386/MainViewController-96B8D44EBB24B056.o
和
/Users/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Intermediates/scheduleTable.build/Debug-iphonesimulator/scheduleTable.build/Objects-normal/i386/MainViewController-4CC6B4B54C957278.o
对于架构 i386 clang:错误:链接器命令失败并退出 代码 1(使用 -v 查看调用)
我已经搜索了此错误的解决方案,但似乎没有任何东西可以解决我的问题或直接相关。关于我可以做些什么来解决它的任何想法?
【问题讨论】:
-
看起来你有一个重复的 MainViewController 。 . .你是如何进行本地化的?是通过添加本地化文件吗?到目前为止你尝试了什么?
-
我检查了重复项,但没有看到任何重复项。我尝试过清理然后再次构建,但错误仍然存在。要添加本地化,我单击 MainViewController.m 并在 Localization 下的文件检查器中单击加号,第一次它给了我英语,然后我第二次创建了瑞典语。然后我选择了新创建的 MainViewController.m(瑞典语)并进行了必要的更改。我检查了我的项目文件夹,在 en.lproj 中有一个 MainViewController.m,在 sv.lproj 中有一个 MainViewController.m。我对其他 .m 文件和 nib 文件做了同样的事情。
-
如果我删除 MainViewController.m(瑞典语)文件它可以工作,有没有办法让瑞典语版本使用不同的名称
标签: iphone objective-c ios cocoa-touch xcode4.2