【问题标题】:ld: library not found for -lGoogleAnalyticsServices clang: error: linker command failed with exit code 1 (use -v to see invocation)ld:找不到 -lGoogleAnalyticsServices 的库 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
【发布时间】:2013-10-05 14:12:40
【问题描述】:

我正在尝试将 Google Analytics 集成到我的 iOS 应用中。但是在添加 Xcode 5 中的最新版本 Google Analytics sdk (v 3.01) 后无法构建。

我已经包含了所有依赖的库/框架,但还是不行。

以下是活动日志:

 Ld /Users/yashsoni/Library/Developer/Xcode/DerivedData/Draft-MovieApp-dnrjzfyordxcuggjpxwhqsoydvvy/Build/Products/Debug-iphoneos/RamLeela.app/RamLeela normal armv7
cd /Users/yashsoni/Documents/NetProjects/Draft-MovieApp
setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Users/yashsoni/Library/Developer/Xcode/DerivedData/Draft-MovieApp-dnrjzfyordxcuggjpxwhqsoydvvy/Build/Products/Debug-iphoneos -F/Users/yashsoni/Library/Developer/Xcode/DerivedData/Draft-MovieApp-dnrjzfyordxcuggjpxwhqsoydvvy/Build/Products/Debug-iphoneos -F/Users/yashsoni/Documents/NetProjects/Draft-MovieApp -filelist /Users/yashsoni/Library/Developer/Xcode/DerivedData/Draft-MovieApp-dnrjzfyordxcuggjpxwhqsoydvvy/Build/Intermediates/Draft-MovieApp.build/Debug-iphoneos/Ramleela.build/Objects-normal/armv7/RamLeela.LinkFileList -dead_strip -fobjc-link-runtime -miphoneos-version-min=6.0 -lGoogleAnalyticsServices -framework CoreData -framework SystemConfiguration -lsqlite3 -framework CFNetwork -framework AdSupport -lz -lsqlite3.0 -framework Twitter -framework CoreLocation -framework Security -framework Accounts -framework Social -framework MessageUI -framework FacebookSDK -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -Xlinker -dependency_info -Xlinker /Users/yashsoni/Library/Developer/Xcode/DerivedData/Draft-MovieApp-dnrjzfyordxcuggjpxwhqsoydvvy/Build/Intermediates/Draft-MovieApp.build/Debug-iphoneos/Ramleela.build/Objects-normal/armv7/RamLeela_dependency_info.dat -o /Users/yashsoni/Library/Developer/Xcode/DerivedData/Draft-MovieApp-dnrjzfyordxcuggjpxwhqsoydvvy/Build/Products/Debug-iphoneos/RamLeela.app/RamLeela

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

【问题讨论】:

  • 嗨 Yash,我也遇到了同样的问题。想知道您是否找到了解决方案?

标签: ios iphone xcode linker google-analytics-api


【解决方案1】:

我建议您使用 xcode 5.02 或 Xcode 5.1(稳定版),然后相应地添加 google 分析,希望这些错误能够得到解决。 在安装 xcode 5.02 之前我也面临同样的问题。希望它也能帮助你。

【讨论】:

    【解决方案2】:

    您是否在“LIBRARY_SEARCH_PATHS”中添加了您的库?

    【讨论】:

      【解决方案3】:

      很抱歉这么晚才知道,这是一个架构问题。错误仅适用于 iPhone 5s 64 位架构。更新 Google 分析框架后,它开始工作了..!!

      如果有帮助,请告诉我。

      【讨论】:

        【解决方案4】:

        确保按照 XCode 的建议更新项目设置,如果显示,这应该可以解决大多数情况下的此类问题。

        【讨论】:

          猜你喜欢
          • 2020-12-19
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多