【发布时间】:2012-03-01 14:04:08
【问题描述】:
我正在尝试从 Cocoa 应用程序上的 YouTube 频道获取视频。为此,首先将 GData 框架添加到我的项目中,然后导入 #import "GData/GData.h"。那么他们是没有错误的。但如果我正在导入 #import "GData/GDataServiceGoogleYouTube.h"
并编写一些与 GDataServiceGoogleYouTube 相关的代码
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)
我该如何解决这个错误?
【问题讨论】:
标签: objective-c xcode cocoa gdata