Issues instantiating GDataServiceGoogleSpreadsheet Class

28 views
Skip to first unread message

Andrew Yanok

unread,
Mar 10, 2010, 9:19:01 PM3/10/10
to Google Data APIs Objective-C Client Library Discussion
My application is on the app store and working properly but now that
I'm attempting to import Spreadsheets I am failing miserably. My
issue is with the following segement of code:

GDataServiceGoogleSpreadsheet *spreadsheetService =
[[[GDataServiceGoogleSpreadsheet alloc] init] autorelease];

xcode is not picking up that this is a defined class, here is the
following error:
: error: 'GDataServiceGoogleSpreadsheet' undeclared (first use in this
function)

Of which I cannot believe. I am importing
#import "GDataServiceGoogleSpreadsheet.h"

Am I missing something simple here? This works fine with the sample
project provided by your team. Any assistance would be much
appreciated!


Greg Robbins

unread,
Mar 10, 2010, 9:22:28 PM3/10/10
to gdata-objec...@googlegroups.com
The spreadsheet files are bracketed with

#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_SPREADSHEET_SERVICE
...
#endif

so if even if your app (or the GData static library) was built with the spreadsheet client source, it probably has GDATA_REQUIRE_SERVICE_INCLUDES defined, so also needs GDATA_INCLUDE_SPREADSHEET_SERVICE defined.


Andrew Yanok

unread,
Mar 10, 2010, 9:44:36 PM3/10/10
to Google Data APIs Objective-C Client Library Discussion
You are correct I forgot to include that statement in my other C
flags, but I cleaned all and built and still got the same error. :
( Any other suggestions, I'm sorry I forgot that part I did that a
while ago.

Andrew Yanok

unread,
Mar 10, 2010, 9:48:09 PM3/10/10
to Google Data APIs Objective-C Client Library Discussion
I'm sorry I forgot to add it to another location I'm getting a
different error, I'll try to work that out quickly.

Andrew Yanok

unread,
Mar 10, 2010, 9:58:53 PM3/10/10
to Google Data APIs Objective-C Client Library Discussion
literal-pointer@__OBJC@__cls_refs@GDataServiceGoogleSpreadsheet in
ImportDecksViewController.o

Is the new error Having trouble finding the solution.

Greg Robbins

unread,
Mar 11, 2010, 12:25:37 AM3/11/10
to gdata-objec...@googlegroups.com
"undeclared" at compile time implies that the expected includes are not really present. Try preprocessing the source (.m) file which is causing the error and inspect the header text included in the preprocessor output.

Andrew Yanok

unread,
Mar 11, 2010, 12:28:47 AM3/11/10
to Google Data APIs Objective-C Client Library Discussion
Thank you, I will look into this more tomorrow!

Thomas Van Lenten

unread,
Mar 11, 2010, 8:00:16 AM3/11/10
to gdata-objec...@googlegroups.com
This looks like a linker error, are you compiling the source in with the same cflags to cause the class impl to get compiled in?

TVL


--
You received this message because you are subscribed to the Google Groups "Google Data APIs Objective-C Client Library Discussion" group.
To post to this group, send email to gdata-objec...@googlegroups.com.
To unsubscribe from this group, send email to gdata-objectivec-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gdata-objectivec-client?hl=en.


Andrew Yanok

unread,
Mar 11, 2010, 12:50:38 PM3/11/10
to Google Data APIs Objective-C Client Library Discussion
Thomas, thank you that pointed me in the right direction. All I
needed todo was compile the Gdata source with that flag. I feel like
such an idiot, Thank you both so much for helping me out :)

> > gdata-objectivec-...@googlegroups.com<gdata-objectivec-clien t%2Bunsu...@googlegroups.com>

Reply all
Reply to author
Forward
0 new messages