Take the 2-minute tour ×

I have the following problem: I'm linking against the Admob library which contains some part of the GData API. But I also want to link with the GData static library to use it directly in my own application.

Of course, I get duplicate symbols at link time.

How can I avoid that?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

The Objective-C GData library includes a header, GDataTargetNamespace.h, with macros to redefine every class in the library.

You can include the header in your project and define a prefix in your target build settings, like


That will add the prefix to every class in the GData library for your application.

This is really a bug in the Admob library, though.

share|improve this answer
As far as I've been able to determine, AdMob doesn't use GData in their library, so perhaps the conflict comes from some other source. –  Greg Robbins Sep 23 '10 at 6:12
How can i include the header in my project please describe in details. see stackoverflow.com/questions/18486349/… –  Arpit Aug 28 '13 at 11:42

There is no way to do that. You may want to read my related answer here. Basically there is only one way for you to do this: Modify the Admob library such that it uses the same GData static library.

On second thought, I'd say you could also load either of the libraries at runtime. The name conflicts will persist, but each objective-C symbol will be overridden. Not sure whether this really works. The first method is nicer, too.

share|improve this answer

Your Answer


