gpt4 book ai didi

objective-c - ld : library not found for -lGoogleToolboxForMac

转载 作者:太空狗 更新时间:2023-10-30 03:24:57 27 4
gpt4 key购买 nike

我正在通过 pod 实现 firebase 设置。

我的 Pod 文件如下所示。

# Uncomment the next line to define a global platform for your project
platform :ios, '8.0'
# $(PROJECT_DIR)/build/Debug-iphoneos/GoogleToolboxForMac lib search path
target 'ProductName' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!

# Pods for mCura

pod 'Firebase/Core'
pod 'Firebase/Messaging'

end

iPad 模拟器一切正常。它正在运行,但是当我在 iDevice 中运行我的应用程序时。它显示找不到库。

ld: library not found for -lGoogleToolboxForMac
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我已经浪费了 2 天的时间来消除这个错误并尝试了我在网上能找到的所有东西。并且 GoogleToolboxForMac 库会在安装 firebase pod 时自动安装。

最佳答案

我将 pod 文件更改为以下代码并重新安装 pod。它为 GoogleToolboxForMac 安装了所有必需的文件。

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'ProductName' do

# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!

pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'GoogleToolboxForMac', '~> 2.1'

end

安装pod后

1) 将方案更改为通用 iOS 设备并构建。

2) 构建成功后,您可以看到黑色的 libGoogleToolboxForMac.a 文件,而不是红色。

3) 现在选择设备并在 iDevice 上运行构建。按照屏幕截图。

enter image description here

或者您可以拥有构建库 libGoogleToolboxForMac.a

关于objective-c - ld : library not found for -lGoogleToolboxForMac,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40848656/

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