【问题标题】:linker command failed with exit code 1链接器命令失败,退出代码为 1
【发布时间】:2015-01-07 10:54:33
【问题描述】:

我在构建 IOS 项目时收到一些错误和警告

ld: warning: directory not found for option '-L/Users/parikshitpatel/Documents/IphoneDevelopment/FH/funkiorangemobile_iphonehealthadviceapp/Social'
ld: warning: directory not found for option '-LMedia/Twitter/Twitter'
ld: warning: directory not found for option '-LLibrary/Libraries'
ld: warning: directory not found for option '-L/Users/parikshitpatel/Documents/IphoneDevelopment/FH/funkiorangemobile_iphonehealthadviceapp0/Social'
ld: warning: directory not found for option '-L&'
ld: warning: directory not found for option '-LHeaders'
ld: warning: directory not found for option '-LMedia/Twitter'
ld: library not found for -lOAuth
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我不知道如何解决此错误,有人可以帮忙吗?

【问题讨论】:

  • 不,我没有使用 pods

标签: ios objective-c clang


【解决方案1】:

您的库路径似乎不正确。
尝试转到:Targets - Build Phases - Link Binary with Libraries
并添加您的 Twitter 库/框架

【讨论】:

【解决方案2】:

在您的文件夹路径中,它们之间有空格。例如:

/Users/parikshitpatel/Documents/IphoneDevelopment/FH/funkiorangemobile_iphonehealthadviceapp/Social Media

在你的库依赖中写Social\ Media

对其他库执行相同操作。

【讨论】:

  • 不,名称之间没有空格
【解决方案3】:

对我来说,我打开的是 .xcodeproj Xcode 项目,而不是 .xcworkspace 工作区。我对 iOS 开发很陌生,但这感觉类似于在 Android Studio 中打开错误的 gradle 文件

【讨论】:

  • 什么鬼,对我来说就是这样……为什么?两者有什么区别?
猜你喜欢
  • 2018-11-03
  • 2015-08-06
  • 2012-05-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-09-14
  • 1970-01-01
相关资源
最近更新 更多