链接器命令失败,退出代码为1(使用-v查看调用 [英] Linker Command failed with exit code 1 (use -v to see invocation

查看:481
本文介绍了链接器命令失败,退出代码为1(使用-v查看调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google Analytics(分析)(iO,目标c),当我将此文件"libGoogleAnalyticsServices.a"添加到我的项目中时,出现此错误

I am working on google analytics (iOs, Objective c), when i add this file "libGoogleAnalyticsServices.a" to my project I got this error

"Apple Mach-O Linker Error"  "clang: error: linker command failed with exit code 1 (use -v to see invocation)". 

我成功添加了以下文件.

I added below files successfully.

GAI.h
GAIDictionaryBuilder.h
GAIEcommerceProduct.h
GAIEcommerceProductAction.h
GAIEcommercePromotion.h
GAIFields.h
GAILogger.h
GAITrackedViewController.h
GAITracker.h

CoreData.framework
SystemConfiguration.framework
libz.dylib
libsqlite3.dylib

当我添加"libGoogleAnalyticsServices.a"此文件时,出现错误.

When I add "libGoogleAnalyticsServices.a" this file i am getting error.

推荐答案

此问题具有不同的解决方案,其中之一是将 Enable Bitcode (启用位码)设置为 No . (我不知道为什么默认情况下它是)此问题是一个类似鬼的问题.清除缓存,重新启动Xcode,Simulator和MAC,确保框架正确链接,或者,有时什么都不做就可以解决此问题.

This problem has different solutions , one of them is to set Enable Bitcode to No . ( I don't know why by default it is Yes ) This problem is a ghost like problem . Clearing Cache , Restarting Xcode , Simulator and MAC ,Ensuring proper linking of Frameworks or , Sometimes just doing nothing can solve this problem .

这篇关于链接器命令失败,退出代码为1(使用-v查看调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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