链接器命令失败,Xcode项目中出现退出代码1错误 [英] Linker command failed with exit code 1 error in Xcode project

查看:93
本文介绍了链接器命令失败,Xcode项目中出现退出代码1错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理我的项目并且在编辑代码后突然编译并发出此错误:

I was working on my project and suddenly after editing the code and compiling gave this error:


ld:警告:目录未找到选项' -

L / Users / mani / Documents / Classes / Twitter + OAuth / Libraries&标题'ld:
重复符号_OBJC_CLASS _ $ _ playSiew in
/Users/mani/Library/Developer/Xcode/DerivedData/learn-aktrtiwswclovoatyweyquoxmypa/Build/Intermediates/learn.build/Debug-iphonesimulator/learn.build /Objects-normal/i386/playSiew.o

/Users/mani/Library/Developer/Xcode/DerivedData/learn-aktrtiwswclovoatyweyquoxmypa/Build/Intermediates/learn.build/Debug-iphonesimulator/learn。体系结构i386 clang的build / Objects-normal / i386 / Thumb.o
:错误:链接器命令失败,退出
代码1(使用-v查看调用)

ld: warning: directory not found for option '-
L/Users/mani/Documents/Classes/Twitter+OAuth/Libraries & Headers' ld: duplicate symbol _OBJC_CLASS_$_playSiew in /Users/mani/Library/Developer/Xcode/DerivedData/learn-aktrtiwswclovoatyweyquoxmypa/Build/Intermediates/learn.build/Debug-iphonesimulator/learn.build/Objects-normal/i386/playSiew.o and /Users/mani/Library/Developer/Xcode/DerivedData/learn-aktrtiwswclovoatyweyquoxmypa/Build/Intermediates/learn.build/Debug-iphonesimulator/learn.build/Objects-normal/i386/Thumb.o for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

我从未触及项目设置,只是编辑了代码。

I never touched the project settings, just edited the code.

更奇怪的是我最后拿出来了从svn修改过的代码,但我仍然得到了同样的错误。

What's more strange is that I took out last revised code from svn but still I got the the same error.

推荐答案

正如我所说的问题不是代码而是一些设置。所以我所做的就是从朋友的Mac上复制代码(它工作正常),并将一个新的项目副本安装到我的Mac上。它奏效了。

As I said the problem wasn't the code but some settings. So what I did was copying the code from my friends' Mac (it was working fine), and installed a fresh copy of the project to my Mac. It worked.

这篇关于链接器命令失败,Xcode项目中出现退出代码1错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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