2014-03-13 1 views
9

오늘 Xcode를 Xcode 5.1로 업데이트했습니다. 이제 코드를 컴파일하고 시뮬레이터에서 테스트 할 때마다 아키텍처 86_64 및 Google Analytics Services 라이브러리에 대한 몇 가지 오류가 발생했습니다. . 이것은 내가 가진 것입니다 :Xcode 5.1 ld : -lGoogleAnalyticsServices에 라이브러리가 없습니다.

Ld /Users/prelite/Library/Developer/Xcode/DerivedData/iSanMarino-hkgasucjnyttlxcbtgqjjpcxutzx/Build/Products/Debug-iphonesimulator/iSanMarino.app/iSanMarino normal x86_64 
    cd "/Users/prelite/Desktop/iSanMarino 3.0" 
    export IPHONEOS_DEPLOYMENT_TARGET=7.0 
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/prelite/Library/Developer/Xcode/DerivedData/iSanMarino-hkgasucjnyttlxcbtgqjjpcxutzx/Build/Products/Debug-iphonesimulator -L/Users/prelite/Desktop/iSanMarino\ 3.0/iSanMarino/Analytics -F/Users/prelite/Library/Developer/Xcode/DerivedData/iSanMarino-hkgasucjnyttlxcbtgqjjpcxutzx/Build/Products/Debug-iphonesimulator -filelist /Users/prelite/Library/Developer/Xcode/DerivedData/iSanMarino-hkgasucjnyttlxcbtgqjjpcxutzx/Build/Intermediates/iSanMarino.build/Debug-iphonesimulator/iSanMarino.build/Objects-normal/x86_64/iSanMarino.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -lGoogleAnalyticsServices -framework AudioToolbox -framework CoreData -framework QuartzCore -framework SystemConfiguration -lsqlite3 -framework EventKitUI -framework EventKit -framework CoreLocation -framework MessageUI -framework MapKit -framework UIKit -framework Foundation -framework CoreGraphics -Xlinker -dependency_info -Xlinker /Users/prelite/Library/Developer/Xcode/DerivedData/iSanMarino-hkgasucjnyttlxcbtgqjjpcxutzx/Build/Intermediates/iSanMarino.build/Debug-iphonesimulator/iSanMarino.build/Objects-normal/x86_64/iSanMarino_dependency_info.dat -o /Users/prelite/Library/Developer/Xcode/DerivedData/iSanMarino-hkgasucjnyttlxcbtgqjjpcxutzx/Build/Products/Debug-iphonesimulator/iSanMarino.app/iSanMarino 

Undefined symbols for architecture x86_64: 
    "_deflate", referenced from: 
     +[GAICompressionUtil gai_dataByCompressingBytes:length:compressionLevel:mode:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o) 
    "_deflateEnd", referenced from: 
     +[GAICompressionUtil gai_dataByCompressingBytes:length:compressionLevel:mode:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o) 
    "_deflateInit2_", referenced from: 
     +[GAICompressionUtil gai_dataByCompressingBytes:length:compressionLevel:mode:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o) 
    "_inflate", referenced from: 
     +[GAICompressionUtil gai_dataByInflatingBytes:length:isRawData:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o) 
    "_inflateEnd", referenced from: 
     +[GAICompressionUtil gai_dataByInflatingBytes:length:isRawData:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o) 
    "_inflateInit2_", referenced from: 
     +[GAICompressionUtil gai_dataByInflatingBytes:length:isRawData:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o) 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

내가 Google 웹 로그 분석 라이브러리도 업데이트 및 제거하고 다시 추가하지 아무것도하려고 노력했다.

+0

나는 3.03c의 새 버전을 다운로드하고 깨끗하게 만들었으며 모든 것이 정상으로 돌아갔습니다. 나는 당신의 오래된 라이브러리 (내 것 같은)가이 아키텍처를 지원하지 않았다고 생각합니다. 다음은 URL https://developers.google.com/analytics/devguides/collection/ios/resources – DBD

+0

입니다. 이미 시도해 보았습니다. 모든 .m 및 .h 프레임 워크 파일을 제거한 다음 모든 파일을 다시 읽었습니다. 3.03c는 깨끗하지만 아무런 변화도주지 않았습니다 ... 아마도 "Build Settings"에 문제가있을 것입니다 ... "Search Path"와 "Valid Architectures"에서 무엇을 설정 했습니까? – prelite

+0

대상을 IOS 장치 고정 문제로 변경합니다. 시뮬레이터의 경우 작동하지 않습니다. 이상한. – Nirav

답변

42

솔루션 : 방금 libz.dylib 프레임 워크를 추가했는데 모든 것이 잘 작동했습니다!

+1

감사합니다. 많은 시간을 절약했습니다. V3가 이전 버전과 호환되지 않는 것은 정말 귀찮은 일입니다. 그리고 새로운 방법은 이전 버전과 같은 일을하기 위해 더 많은 코딩을 필요로합니다. 자신의 대답을 정답으로 받아주십시오. – Ray

+0

도와 줘서 기뻐 ... :) – prelite

+0

고마워 젠장. 난 그냥 미쳤어! –

-1

.xcodeproj 파일을로드하고 빌드하려고하면이 오류가 발생합니다. 대신 포함 된 .xcworkspace를 열면 괜찮을 것입니다.

중 하나 "다른 열기"를 선택하고 프로젝트 디렉토리에서 선택하거나 프로젝트 디렉토리에서 명령 프롬프트에서 :

open <YourProjectName>.xcworkspace 

다른 의존성이 필요하지되어야한다.