ld:找不到-lGoogleToolboxForMac的库 [英] ld: library not found for -lGoogleToolboxForMac

查看:123
本文介绍了ld:找不到-lGoogleToolboxForMac的库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过Pod实施Firebase设置.

I am implementing firebase setup via pods.

我的Pods文件如下图所示.

My Pods file looks like following one.

# 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中运行我的应用程序时.它显示未找到库.

Everything is fine with iPad simulator. its running but when I run my application in iDevice. It shows library not found.

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

我已经浪费了2天的时间来消除此错误&尝试了所有我可以在网上找到的东西.安装Firebase Pod时,会自动安装GoogleToolboxForMac库.

I have already wasted 2 days for removing this error & tried everything I could find on net. And GoogleToolboxForMac library automatically installs when firebase pod get installed.

推荐答案

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

I change my pod file to following code and re-install pod. It installed all necessary files for 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设备和内部版本.

1) Change Scheme to Generic iOS Device and Build.

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

2) After build success you can see libGoogleToolboxForMac.a file in black colour instead of red.

3)现在选择Device并在iDevice上运行build.跟随屏幕截图.

3) Now select Device and run build on iDevice. Follow screenshot.

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

Or you can have build library libGoogleToolboxForMac.a

这篇关于ld:找不到-lGoogleToolboxForMac的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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