Including JumpTap causes build to fail for device

12 views
Skip to first unread message

erik.madsen

unread,
Oct 8, 2010, 5:37:27 PM10/8/10
to AdWhirl Users
ld: duplicate symbol _OBJC_METACLASS_$_AdEvent in /Users/erikmadsen/
Documents/Projects/iRovr/App/iRovr/jtUniversalLib.a(AdEvent.o) and /
Users/erikmadsen/Documents/Projects/iRovr/App/iRovr/
jtUniversalLib.a(AdEvent.o)

Any suggestions? I'm kind of new to iOS development, so the more
details the better. Thanks in advance.

Grant

unread,
Oct 8, 2010, 7:12:25 PM10/8/10
to AdWhirl Users
Well, although I am not an expert I am not new to iOS development
either and have the same issue.

The odd thing is that the duplicate symbol is coming from the same
file. I have confirmed that I do not have the file included twice
either.

It will compile fine in Sim but not for Device. If you remove the
linker flag "-all_load" it will compile however Apple has been known
to reject apps that do not include that flag.

I'm not sure what is causing this issue. I have the latest JumpTap
SDK and AdWhirl 2.6.0. I will see if 2.6.1 fixes problem but doubt
it.

erik.madsen

unread,
Oct 8, 2010, 7:55:27 PM10/8/10
to AdWhirl Users
Thanks for the reply. I've tried removing the -all_load flag but it
appears the bits of Three20 I am using require that.

wes

unread,
Oct 8, 2010, 7:58:23 PM10/8/10
to adwhir...@googlegroups.com
This sounds like a jumptap problem.  Are you seeing this when deploying to the simulator or to a device?  It's possible that they're doubly-including an object file when they build their SDK (we had a similar problem for AFMA a few releases ago).  The solution was to use -force_load in lieu of -all_load until the next release.

If you want to check, you can use `nm -arch $ARCH jtUniversalLib.a` and look for multiple AdEvent.o's ($ARCH is one of 'armv6', 'armv7' or 'i386' depending on whether you're building for an old iphone or 3G; 3GS, 4, or ipad; or simulator, respectively).

I guess the other option is that your library path is picking up multiple jtUniversalLib.a's...

Probably the best advice I can give is to look at using -force_load instead of -all_load: http://stackoverflow.com/questions/2567498/objective-c-categories-in-static-library sort-of discusses this.

Cheers,
Wes

Grant Stewart

unread,
Oct 9, 2010, 1:34:09 AM10/9/10
to adwhir...@googlegroups.com
Based on your suggestion, there are a bunch duplicate entries in both armv6 and armv7 but not i386 which explains why it compiles on Simulator.

I'll have to look into -force_load.  I've never used that option before.

I will email JumpTap as well.
--
Grant Stewart

LeftieAZ

unread,
Nov 18, 2010, 9:08:42 PM11/18/10
to AdWhirl Users
I couldn't get -force_load to work. I keep getting a linker error of
basically not under standing the command.

However, I found an interesting workaround to trick the linker to
include the missing category implementations. No need for -all_load
to get Three20 working.

Just add something like the following to the category file.

NSStringAdditions.h
// workaround to avoid using -all_load
// ref: http://stackoverflow.com/questions/2567498/objective-c-categories-in-static-librarysort-of
void useThree20CoreNSStringAdditions();
@interface NSObject (NSStringAdditions)
@end


NSStringAdditions.m
void useThree20CoreNSStringAdditions(){
useThree20CoreNSDataAdditions();
}
@implementation NSObject (NSStringAdditions)
@end

Then before using the unrecognized selector, call
"useThree20CoreNSStringAdditions()"
Reply all
Reply to author
Forward
0 new messages