首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Xcode链接器错误和吊舱安装仅指示4中的3项依赖项。

Xcode链接器错误和吊舱安装仅指示4中的3项依赖项。
EN

Stack Overflow用户
提问于 2019-04-22 04:20:05
回答 1查看 244关注 0票数 1

在Xcode 10.1中,我得到了围绕SwiftCharts的链接器错误。这是在我开始运行10.2之后,由于Xcode错误,需要恢复到10.1。我关闭了Xcode并用以下方法清洗了吊舱:

代码语言:javascript
复制
  rm -rf ~/Library/Caches/CocoaPods
  rm -rf Pods
  rm -rf ~/Library/Developer/Xcode/DerivedData/*
  pod deintegrate
  pod setup
  pod install

结果未见DerivedData。安装的输出如下:

代码语言:javascript
复制
pod install
Analyzing dependencies
Downloading dependencies
Installing Realm (3.14.1)
Installing RealmSwift (3.14.1)
Installing SwiftCharts (0.6.5)
Installing SwiftGraph (2.0.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 4 total pods installed.

此时,DerivedData中没有数据。

当我启动Xcode时,我得到一个链接器错误:

代码语言:javascript
复制
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/Realm'
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/RealmSwift'
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/SwiftCharts'
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/SwiftGraph'
: Linker command failed with exit code 1 (use -v to see invocation)

在编辑中:

代码语言:javascript
复制
ld: framework not found SwiftCharts

在DerivedData下面,在Debug-iphone仿真器文件夹中,我没有看到警告应该存在的任何框架。为什么缺少框架目录,为什么SwiftCharts安装但链接器不可用?

Podfile:

代码语言:javascript
复制
# Uncomment the next line to define a global platform for your project
platform :ios, '12.1'

target 'ProjectCoreData' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  pod 'SwiftCharts', '~> 0.6.3'
  pod 'SwiftGraph'
  pod 'OverlayContainer'
  pod 'RealmSwift'

  # Pods for ProjectCoreData

  target 'ProjectCoreDataTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'ProjectCoreDataUITests' do
    inherit! :search_paths
    # Pods for testing
  end

"Podfile" 24L, 549C

Podfile.lock:

代码语言:javascript
复制
PODS:
  - OverlayContainer (2.0.0)
  - Realm (3.14.1):
    - Realm/Headers (= 3.14.1)
  - Realm/Headers (3.14.1)
  - RealmSwift (3.14.1):
    - Realm (= 3.14.1)
  - SwiftCharts (0.6.5)
  - SwiftGraph (3.0.0)

DEPENDENCIES:
  - OverlayContainer
  - RealmSwift
  - SwiftCharts (~> 0.6.3)
  - SwiftGraph
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-04-22 07:05:50

我认为这是因为SwiftCharts (0.6.5)是为使用Xcode 10.2构建的,所以它与Xcode 10.1不兼容,只需使用SwiftCharts的旧版本(0.6.3或更高版本)即可。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55789058

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档