Duplicate symbolic error when linking multiple static libraries.

There are already many related questions, but I just don’t understand how to solve this. I am creating an application that includes two separate static libraries: RestKit and the other on the NDA. When I create, I get an Apple Mach-O linker error as follows:

duplicate symbol _NewBase64Decode 
in /Users/geraldwburke/Desktop/iOS Programming/MyApp/someLib.a(NSData+Base64.o) 
and /Users/geraldwburke/Library/Developer/Xcode/DerivedData/MyAppddlwzdeskfwaxyargomvfhurvxzi/Build/Products/Debug-iphoneos/libRestKit.a(NSData+Base64.o) 
for architecture armv7

Now I have seen some potential fixes. This article seemed promising. I also tried adding a build rule using the script from this blog post . I tried adding and removing the -ObjC, -all_load and -force_load flags. No matter what I tried, I still get the same error. Does anyone know how to fix this?

By the way, I will delete my identical post. Wrote on the wrong acct.

+5
source share
1 answer

The easiest solution is to change the source code of one of these libraries so that you don’t define it NewBase64Decode. RestKit is open source; I do not know if you have the source of your secret NDA library.

+3
source

All Articles