Reputation: 3159
I'm trying to use GDataXML library in my ipad application. I followed by instructions:
If in code i add #import "GDataXMLNode.h", all is fine. But when i try to use GDataXMLDocument class in my app
GDataXMLDocument *doc = [[GDataXMLDocument alloc] initWithData:xmlData options:0 error:nil];
I received the following message:
Ld build/Debug-iphonesimulator/DemoApp.app/DemoApp normal i386
cd /Users/svp/Projects/DemoApp
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -L/Users/svp/Projects/DemoApp/build/Debug-iphonesimulator -F/Users/svp/Projects/DemoApp/build/Debug-iphonesimulator -filelist /Users/svp/Projects/DemoApp/build/DemoApp.build/Debug-iphonesimulator/DemoApp.build/Objects-normal/i386/DemoApp.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -framework MapKit -framework QuartzCore -lxml2.2 -o /Users/svp/Projects/DemoApp/build/Debug-iphonesimulator/DemoApp.app/DemoApp
Undefined symbols:
"_OBJC_CLASS_$_GDataXMLDocument", referenced from:
objc-class-ref-to-GDataXMLDocument in TwitterService.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Any thoughts?
Upvotes: 1
Views: 2181
Reputation: 786
Best thing is to leave the source code untouched and tell your project not to apply the ARC mechanism to this file. To do so: 1- Select the build phases of your projet 2- Select the GDataXMLNode.m file 3- Add the switch: -fno-objc-arc to this file alone (by double clicking on it)
Bingo!
Hope it helps.
Upvotes: 1
Reputation: 1564
It sounds like the GDataXMLNode.m code isn't being linked in. Is that source file really added to the target being built in Xcode?
Upvotes: 3
Reputation: 8114
Check the following:
Its seems like you have missed to update the path from where you are referencing the file.
Upvotes: 1