ld:找不到-lGoogleAnalyticsServices clang的库:错误:链接器命令失败,退出代码为1(使用-v查看调用)

时间:2013-10-05 14:12:41

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

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

我已经包含了所有依赖的库/框架,但仍然没有。

以下是活动日志:

 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)

4 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

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

答案 2 :(得分:0)

很抱歉让ans这么晚,这是一个架构问题。 Ther error仅适用于iPhone 5s 64位架构。更新Google分析框架后,让它正常运行.. !!

如果有帮助,请告诉我。

答案 3 :(得分:-1)

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