私はCocoaアプリケーションでYouTubeチャンネルからビデオを取得しようとしています。そのために、私のプロジェクトにGDataフレームワークを追加し、#import "GData/GData.h"をインポートします。それでは、エラーはありません。しかし、場合、私はの#import "のGData/GDataServiceGoogleYouTube.h"Gcode APIのXcode-4 Cocoaアプリケーションでのコンパイラエラー?
をインポートし、GDataServiceGoogleYouTube
コンパイラEROR取得GDataServiceGoogleYouTube *service=[[GDataServiceGoogleYouTube alloc]init];
に関連するいくつかのコードを記述しています:
Ld /Users/Rasheed/Library/Developer/Xcode/DerivedData/YouTube-ddawzlgkbmkdqsalghaobsospjth/Build/Products/Debug/YouTube.app/Contents/MacOS/YouTube normal x86_64
cd /Users/Rasheed/Desktop/MULTIPLESOCKET/YouTube
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/clang -arch x86_64 -isysroot
/Developer/SDKs/MacOSX10.6.sdk -L/Users/Rasheed/Library/Developer/Xcode/DerivedData/YouTube-ddawzlgkbmkdqsalghaobsospjth/Build/Products/Debug
-F/Users/Rasheed/Library/Developer/Xcode/DerivedData/YouTube-ddawzlgkbmkdqsalghaobsospjth/Build/Products/Debug -filelist
/Users/Rasheed/Library/Developer/Xcode/DerivedData/YouTube-ddawzlgkbmkdqsalghaobsospjth
/Build/Intermediates/YouTube.build/Debug/YouTube.build/Objects-normal/x86_64/YouTube.LinkFileList -mmacosx-version-min=10.6 -ObjC
-lxml2 -all_load -framework Cocoa -o /Users/Rasheed/Library/Developer/Xcode/DerivedData/YouTube-ddawzlgkbmkdqsalghaobsospjth/Build
/Products/Debug/YouTube.app/Contents/MacOS/YouTube
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GDataServiceGoogleYouTube", referenced from:
objc-class-ref in YouTubeAppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
私はこのエラーを修正するにはどうすればよいですか?
をターゲット依存関係の下でGDataFrameworkは(Gdataの) –
ですから、「リンク・バイナリとライブラリ」セクションに追加したのである項目を1つだけ? –
はい、「ライブラリとバイナリをリンクする」セクションのGData.FrameworkとlibGDataTouchstaticlib.aを追加しました。 –