I am trying to build a small Cocoa application for MAC OS X which uses
Google Docs API via the GData.framework
I have followed the link 'Building the Library'
http://code.google.com/p/gdata-objectivec-client/wiki/BuildingTheLibrary
and I linked the GData.framework in my project as described in the
document.
The project is a brand new Cocoa application, with only one class that
in my one and only Action has this one line:
GDataServiceGoogleDocs *service = [[GDataServiceGoogleDocs alloc]
init];
BUT
When I compile I get this error:
Undefined symbols:
"_OBJC_CLASS_$_GDataServiceGoogleDocs", referenced from:
objc-class-ref-to-GDataServiceGoogleDocs in MainMenuController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
It seems that, although the headers are accessible to XCode, the
linking does not succeed.
Is there anyone that can give me a step by step example on how to do
this?
I have compiled the examples and they work fine, and I have tried
copying the structure of the project with the same Build Phases and
all... without any luck!
I would really appreciate any help.
Tnx,
Chris
PS. The full build output is listed below:
Build TestProj of project TestProj with configuration Debug
ProcessInfoPlistFile /Users/Chris/Desktop/TestProj/build/Debug/
TestProj.app/Contents/Info.plist TestProj-Info.plist
cd /Users/Chris/Desktop/TestProj
builtin-infoPlistUtility TestProj-Info.plist -genpkginfo /Users/Chris/
Desktop/TestProj/build/Debug/TestProj.app/Contents/PkgInfo -
expandbuildsettings -platform macosx -o /Users/Chris/Desktop/TestProj/
build/Debug/TestProj.app/Contents/Info.plist
CopyStringsFile /Users/Chris/Desktop/TestProj/build/Debug/TestProj.app/
Contents/Resources/English.lproj/InfoPlist.strings English.lproj/
InfoPlist.strings
cd /Users/Chris/Desktop/TestProj
setenv ICONV /usr/bin/iconv
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/
Resources/copystrings --validate --inputencoding utf-8 --
outputencoding UTF-16 English.lproj/InfoPlist.strings --outdir /Users/
Chris/Desktop/TestProj/build/Debug/TestProj.app/Contents/Resources/
English.lproj
CompileXIB /Users/Chris/Desktop/TestProj/English.lproj/MainMenu.xib
cd /Users/Chris/Desktop/TestProj
/Developer/usr/bin/ibtool --errors --warnings --notices --output-
format human-readable-text --compile /Users/Chris/Desktop/TestProj/
build/Debug/TestProj.app/Contents/Resources/English.lproj/
MainMenu.nib /Users/Chris/Desktop/TestProj/English.lproj/MainMenu.xib
--sdk /Developer/SDKs/MacOSX10.6.sdk
ProcessPCH /var/folders/nI/nIEOBKrOFb4M2Ggj7b0Ae++++TI/-Caches-/
com.apple.Xcode.501/SharedPrecompiledHeaders/TestProj_Prefix-
fijkwwwlohyljhfhtolutjeyyuko/TestProj_Prefix.pch.gch
TestProj_Prefix.pch normal x86_64 objective-c com.apple.compilers.gcc.
4_2
cd /Users/Chris/Desktop/TestProj
setenv LANG en_US.US-ASCII
/Developer/usr/bin/gcc-4.2 -x objective-c-header -arch x86_64 -
fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-
blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/
MacOSX10.6.sdk -mfix-and-continue -mmacosx-version-min=10.6 -gdwarf-2 -
iquote /Users/Chris/Desktop/TestProj/build/TestProj.build/Debug/
TestProj.build/TestProj-generated-files.hmap -I/Users/Chris/Desktop/
TestProj/build/TestProj.build/Debug/TestProj.build/TestProj-own-target-
headers.hmap -I/Users/Chris/Desktop/TestProj/build/TestProj.build/
Debug/TestProj.build/TestProj-all-target-headers.hmap -iquote /Users/
Chris/Desktop/TestProj/build/TestProj.build/Debug/TestProj.build/
TestProj-project-headers.hmap -F/Users/Chris/Desktop/TestProj/build/
Debug -F/Users/Chris/Desktop/TestProj/../../Downloads/gdata-objectivec-
client-1.10.0/Source/build/Debug -I/Users/Chris/Desktop/TestProj/build/
Debug/include -I/Users/Chris/Desktop/TestProj/build/TestProj.build/
Debug/TestProj.build/DerivedSources/x86_64 -I/Users/Chris/Desktop/
TestProj/build/TestProj.build/Debug/TestProj.build/DerivedSources -
DDEBUG=1 -c /Users/Chris/Desktop/TestProj/TestProj_Prefix.pch -o /var/
folders/nI/nIEOBKrOFb4M2Ggj7b0Ae++++TI/-Caches-/com.apple.Xcode.501/
SharedPrecompiledHeaders/TestProj_Prefix-fijkwwwlohyljhfhtolutjeyyuko/
TestProj_Prefix.pch.gch
CompileC build/TestProj.build/Debug/TestProj.build/Objects-normal/
x86_64/main.o /Users/Chris/Desktop/TestProj/main.m normal x86_64
objective-c com.apple.compilers.gcc.4_2
cd /Users/Chris/Desktop/TestProj
setenv LANG en_US.US-ASCII
/Developer/usr/bin/gcc-4.2 -x objective-c -arch x86_64 -fmessage-
length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -
O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/
MacOSX10.6.sdk -mfix-and-continue -mmacosx-version-min=10.6 -gdwarf-2 -
iquote /Users/Chris/Desktop/TestProj/build/TestProj.build/Debug/
TestProj.build/TestProj-generated-files.hmap -I/Users/Chris/Desktop/
TestProj/build/TestProj.build/Debug/TestProj.build/TestProj-own-target-
headers.hmap -I/Users/Chris/Desktop/TestProj/build/TestProj.build/
Debug/TestProj.build/TestProj-all-target-headers.hmap -iquote /Users/
Chris/Desktop/TestProj/build/TestProj.build/Debug/TestProj.build/
TestProj-project-headers.hmap -F/Users/Chris/Desktop/TestProj/build/
Debug -F/Users/Chris/Desktop/TestProj/../../Downloads/gdata-objectivec-
client-1.10.0/Source/build/Debug -I/Users/Chris/Desktop/TestProj/build/
Debug/include -I/Users/Chris/Desktop/TestProj/build/TestProj.build/
Debug/TestProj.build/DerivedSources/x86_64 -I/Users/Chris/Desktop/
TestProj/build/TestProj.build/Debug/TestProj.build/DerivedSources -
DDEBUG=1 -include /var/folders/nI/nIEOBKrOFb4M2Ggj7b0Ae++++TI/-Caches-/
com.apple.Xcode.501/SharedPrecompiledHeaders/TestProj_Prefix-
fijkwwwlohyljhfhtolutjeyyuko/TestProj_Prefix.pch -c /Users/Chris/
Desktop/TestProj/main.m -o /Users/Chris/Desktop/TestProj/build/
TestProj.build/Debug/TestProj.build/Objects-normal/x86_64/main.o
CompileC build/TestProj.build/Debug/TestProj.build/Objects-normal/
x86_64/TestProjAppDelegate.o /Users/Chris/Desktop/TestProj/
TestProjAppDelegate.m normal x86_64 objective-c
com.apple.compilers.gcc.4_2
cd /Users/Chris/Desktop/TestProj
setenv LANG en_US.US-ASCII
/Developer/usr/bin/gcc-4.2 -x objective-c -arch x86_64 -fmessage-
length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -
O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/
MacOSX10.6.sdk -mfix-and-continue -mmacosx-version-min=10.6 -gdwarf-2 -
iquote /Users/Chris/Desktop/TestProj/build/TestProj.build/Debug/
TestProj.build/TestProj-generated-files.hmap -I/Users/Chris/Desktop/
TestProj/build/TestProj.build/Debug/TestProj.build/TestProj-own-target-
headers.hmap -I/Users/Chris/Desktop/TestProj/build/TestProj.build/
Debug/TestProj.build/TestProj-all-target-headers.hmap -iquote /Users/
Chris/Desktop/TestProj/build/TestProj.build/Debug/TestProj.build/
TestProj-project-headers.hmap -F/Users/Chris/Desktop/TestProj/build/
Debug -F/Users/Chris/Desktop/TestProj/../../Downloads/gdata-objectivec-
client-1.10.0/Source/build/Debug -I/Users/Chris/Desktop/TestProj/build/
Debug/include -I/Users/Chris/Desktop/TestProj/build/TestProj.build/
Debug/TestProj.build/DerivedSources/x86_64 -I/Users/Chris/Desktop/
TestProj/build/TestProj.build/Debug/TestProj.build/DerivedSources -
DDEBUG=1 -include /var/folders/nI/nIEOBKrOFb4M2Ggj7b0Ae++++TI/-Caches-/
com.apple.Xcode.501/SharedPrecompiledHeaders/TestProj_Prefix-
fijkwwwlohyljhfhtolutjeyyuko/TestProj_Prefix.pch -c /Users/Chris/
Desktop/TestProj/TestProjAppDelegate.m -o /Users/Chris/Desktop/
TestProj/build/TestProj.build/Debug/TestProj.build/Objects-normal/
x86_64/TestProjAppDelegate.o
CompileC build/TestProj.build/Debug/TestProj.build/Objects-normal/
x86_64/MainMenuController.o /Users/Chris/Desktop/TestProj/
MainMenuController.m normal x86_64 objective-c com.apple.compilers.gcc.
4_2
cd /Users/Chris/Desktop/TestProj
setenv LANG en_US.US-ASCII
/Developer/usr/bin/gcc-4.2 -x objective-c -arch x86_64 -fmessage-
length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -
O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/
MacOSX10.6.sdk -mfix-and-continue -mmacosx-version-min=10.6 -gdwarf-2 -
iquote /Users/Chris/Desktop/TestProj/build/TestProj.build/Debug/
TestProj.build/TestProj-generated-files.hmap -I/Users/Chris/Desktop/
TestProj/build/TestProj.build/Debug/TestProj.build/TestProj-own-target-
headers.hmap -I/Users/Chris/Desktop/TestProj/build/TestProj.build/
Debug/TestProj.build/TestProj-all-target-headers.hmap -iquote /Users/
Chris/Desktop/TestProj/build/TestProj.build/Debug/TestProj.build/
TestProj-project-headers.hmap -F/Users/Chris/Desktop/TestProj/build/
Debug -F/Users/Chris/Desktop/TestProj/../../Downloads/gdata-objectivec-
client-1.10.0/Source/build/Debug -I/Users/Chris/Desktop/TestProj/build/
Debug/include -I/Users/Chris/Desktop/TestProj/build/TestProj.build/
Debug/TestProj.build/DerivedSources/x86_64 -I/Users/Chris/Desktop/
TestProj/build/TestProj.build/Debug/TestProj.build/DerivedSources -
DDEBUG=1 -include /var/folders/nI/nIEOBKrOFb4M2Ggj7b0Ae++++TI/-Caches-/
com.apple.Xcode.501/SharedPrecompiledHeaders/TestProj_Prefix-
fijkwwwlohyljhfhtolutjeyyuko/TestProj_Prefix.pch -c /Users/Chris/
Desktop/TestProj/MainMenuController.m -o /Users/Chris/Desktop/TestProj/
build/TestProj.build/Debug/TestProj.build/Objects-normal/x86_64/
MainMenuController.o
/Users/Chris/Desktop/TestProj/MainMenuController.m: In function '-
[MainMenuController click:]':
/Users/Chris/Desktop/TestProj/MainMenuController.m:18: warning: unused
variable 'service'
Ld build/Debug/TestProj.app/Contents/MacOS/TestProj normal x86_64
cd /Users/Chris/Desktop/TestProj
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/gcc-4.2 -arch x86_64 -isysroot /Developer/SDKs/
MacOSX10.6.sdk -L/Users/Chris/Desktop/TestProj/build/Debug -F/Users/
Chris/Desktop/TestProj/build/Debug -F/Users/Chris/Desktop/
TestProj/../../Downloads/gdata-objectivec-client-1.10.0/Source/build/
Debug -filelist /Users/Chris/Desktop/TestProj/build/TestProj.build/
Debug/TestProj.build/Objects-normal/x86_64/TestProj.LinkFileList -
mmacosx-version-min=10.6 -framework Cocoa -framework GData -o /Users/
Chris/Desktop/TestProj/build/Debug/TestProj.app/Contents/MacOS/
TestProj
ld: warning: in /Users/Chris/Downloads/gdata-objectivec-client-1.10.0/
Source/build/Debug/GData.framework/GData, missing required
architecture x86_64 in file
Undefined symbols:
"_OBJC_CLASS_$_GDataServiceGoogleDocs", referenced from:
objc-class-ref-to-GDataServiceGoogleDocs in MainMenuController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status