views:

235

answers:

3

Do you have any idea? Why XCode compilation give this result?

ld: duplicate symbol _kJSONDeserializerErrorDomain in 
  /Users/Shared/_BUILDS_/Debug-iphoneos/libLACDLibrary.a(CJSONDeserializer.o) 
  and /Users/Shared/_BUILDS_/Debug-iphoneos/libLACDLibrary.a(CJSONDeserializer.o)
A: 

I have exactly the same problem. And it only complains for arm6 build (not arm7 build). I found a workaround: remove "-all_load" in Other linker flag under Build<-Get Info<-Target. I am not sure whether it is a correct workaround. I hope somebody can explain further and provide the correct workaround if this one is not.

grinchdee
A: 

Hey, you probably have a duplicate reference in XCode to CJSONDeserializer, so it's compiled and linked twice.

Ariejan
A: 

This error occurs if you link the same library into your project multiple times.

Project dependencies are subtly different from linking the libraries together. It is okay to have several projects depend on the same shared library project X; however, make sure that only one of the projects actually links the library.

Isaac Sutherland