gpt4 book ai didi

ios - Xcode 错误 : library not found for -lGoogleToolboxForMac

转载 作者:可可西里 更新时间:2023-11-01 06:18:13 28 4
gpt4 key购买 nike

我正在尝试在我的 iPhone 应用程序(用 objective-c 编写)中安装 admobs。我已经使用 swift 项目实现了很多次,但目前我不断收到以下构建错误:

ld: warning: directory not found for option '-L/Users/charlieseligman/Library/Developer/Xcode/DerivedData/ThamesClippers-csissodainpbbjenykdyxuutzxtg/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac'
ld: warning: directory not found for option '-L/Users/charlieseligman/Documents/GIT/iOS.ThamesClippers/build/Debug-iphoneos/GoogleToolboxForMac'
ld: library not found for -lGoogleToolboxForMac
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我肯定会打开 .xcworkspace 文件(而不是 .xcodeproj 文件)。

我还尝试删除“DerivedData”文件夹内容并“清理”项目并执行“清理构建文件夹”。没有人解决了这个问题。

我的 podfile 只包含以下 pod:

# Pods for ThamesClippers
pod 'Google/Analytics'
pod 'Firebase/Core'
pod 'Firebase/AdMob'

# Trying to fix GoogleToolboxForMac missing error
pod 'Firebase/Messaging'
pod 'GoogleToolboxForMac/Logger'
pod 'GoogleToolboxForMac', '~> 2.1'

我曾尝试将底部的 3 个逐个添加,但一直出现相同的构建错误。

有人可以帮忙吗?对此完全不知所措。看到这两个问题,但他们接受的解决方案并没有解决这个问题:

Framework not found GoogleToolboxForMac ld: library not found for -lGoogleToolboxForMac

最佳答案

终于解决了:

  1. Xcode > 产品 > 方案 > 管理方案
  2. 选择“显示”失败的方案 (GoogleToolboxForMac)
  3. 在“停止”按钮右侧的下拉列表中选择此方案
  4. 建立这个方案
  5. 然后选择原始方案(在第 3 步提到的下拉列表中)并重建

全部正确构建。

所以看起来我必须手动构建单独的方案。

注意:要自动构建这些,请使用 Product > Scheme > 'Edit Scheme' > Build > 并确保添加所有目标,并在底部添加项目目标。

关于ios - Xcode 错误 : library not found for -lGoogleToolboxForMac,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40962936/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com