Start a new topic

Duplicate symbols

Duplicate symbols

I have integrated Wikitude SDK, and then added via Cocoapods Google cardboard sdk. And after that in xcode I got compile errors. On device app launches as usual but google cardboard code doesn't work, just black screen. I think it's because the sdk's have some duplicates libraries.

Can you help me?

It seems that this is in the object json_value.o  file

Hi Andrew,
Do you know with which version of libpng teh GVRSDK was build?


Best regards,


Andreas, any advice on how to remove the duplicate symbols?

Hi Andrew,
The only suggestion I can give right now is to remove the duplicate symbold from either our SDK or the Cardboard SDK.

This tutorial should help you out.

Best regards,


Thanks Andreas,

The original post show's errors that are only showing up in the Simulator (strange that it builds fine for devices and then crashes) so it's hard to work out which symbols are causing the issue. 

Looking at the tutorial and the output from the simulator log, I'm guessing I need to remove libCommonLibrary.a. Does this sound correct (because the name seems to indicate that it's important). Is libCommonLibrary.a a WikiTude library or a reducntant common system library and do you think this is the file I should remove?

Please forgive my ignorance - never had to do this before. 




So I'm obviously removing the wrong symbols I've attached the steps I've taken below to remove libCommonLibrary.a from the SDK. Appears to all be wokring but I'm getting even more errors now so clearly this is a required library. Any advice as to which symbols I need to remove?




Undefined symbols for architecture arm64:

  "_FreeImage_GetFIFCount", referenced from:

      _FreeImage_GetFileTypeFromHandle in WikitudeSDK(GetType.o)

  "_FreeImage_SaveToHandle", referenced from:

      _FreeImage_SaveToMemory in WikitudeSDK(MemoryIO.o)

  "_FreeImage_LoadFromHandle", referenced from:

      _FreeImage_LoadFromMemory in WikitudeSDK(MemoryIO.o)

  "_FreeImage_DeInitialise", referenced from:

      wikitude::sdk_foundation::impl::ImageLoader::~ImageLoader() in WikitudeSDK(ImageLoader.o)

      FreeImage_SO_DeInitialise() in WikitudeSDK(FreeImage.o)

  "_FreeImage_Initialise", referenced from:

      wikitude::sdk_foundation::impl::ImageLoader::ImageLoader(wikitude::sdk_foundation::impl::ImageLoaderObserver&, wikitude::sdk_foundation::impl::ImageLoadingQueue&) in WikitudeSDK(ImageLoader.o)

      FreeImage_SO_Initialise() in WikitudeSDK(FreeImage.o)

  "_FreeImage_Validate", referenced from:

      _FreeImage_GetFileTypeFromHandle in WikitudeSDK(GetType.o)

  "_FreeImage_GetFormatFromFIF", referenced from:

      wikitude::sdk_foundation::impl::FreeImageErrorHandler(FREE_IMAGE_FORMAT, char const*) in WikitudeSDK(ImageLoader.o)

      wikitude::sdk_foundation::impl::ImageLoader::internalThreadEntry() in WikitudeSDK(ImageLoader.o)

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)






cd Wikitude.framework


lipo -info WikitudeSDK 

# @return Architectures in the fat file: WikitudeSDK are: armv7 armv7s i386 x86_64 arm64 


# Split libraries

lipo -thin armv7 WikitudeSDK -output WikitudeSDK-armv7


# Look inside 

ar -t WikitudeSDK-armv7

# @returns big list of .o


# Extract files into new folder

mkdir WikitudeSDK-armv7-extracted

cd WikitudeSDK-armv7-extracted

ar -x ../WikitudeSDK-armv7

# @returns new folder with extraced libraries


# Remove problematic library

rm -rf libCommonLibrary.a-armv7-master


# Repackage

libtool  -static *.o -o ../WikitudeSDK-armv7-noLibCommon



cd ../


# Repeated process for armv7s

lipo -thin armv7s WikitudeSDK -output WikitudeSDK-armv7s

mkdir WikitudeSDK-armv7s-extracted

cd WikitudeSDK-armv7s-extracted

ar -x ../WikitudeSDK-armv7s

rm -rf libCommonLibrary.a-armv7s-master

libtool  -static *.o -o ../WikitudeSDK-armv7s-noLibCommon


cd ../


# Repeated process for i386

lipo -thin i386 WikitudeSDK -output WikitudeSDK-i386

mkdir WikitudeSDK-i386-extracted

cd WikitudeSDK-i386-extracted

ar -x ../WikitudeSDK-i386

rm -rf libCommonLibrary.a-i386-master

libtool  -static *.o -o ../WikitudeSDK-i386-noLibCommon


cd ../


# Repeated process for x86_64

lipo -thin x86_64 WikitudeSDK -output WikitudeSDK-x86_64

mkdir WikitudeSDK-x86_64-extracted

cd WikitudeSDK-x86_64-extracted

ar -x ../WikitudeSDK-x86_64

rm -rf libCommonLibrary.a-x86_64-master

libtool  -static *.o -o ../WikitudeSDK-x86_64-noLibCommon

cd ../


# Repeated process for arm64

lipo -thin arm64 WikitudeSDK -output WikitudeSDK-arm64

mkdir WikitudeSDK-arm64-extracted

cd WikitudeSDK-arm64-extracted

ar -x ../WikitudeSDK-arm64

rm -rf libCommonLibrary.a-arm64-master

libtool  -static *.o -o ../WikitudeSDK-arm64-noLibCommon

cd ../






lipo -create WikitudeSDK-arm64-noLibCommon WikitudeSDK-armv7-noLibCommon WikitudeSDK-armv7s-noLibCommon WikitudeSDK-i386-noLibCommon WikitudeSDK-x86_64-noLibCommon -output WikitudeSDK-noLibCommon # I renamed the WikitudeSDK-noLibCommon to WikitudeSDK manually and deleted the old version. 






Hi Andrew,

it is very likely not libCommonLibrary.a that is conflicting but one of the usual image handling libraries like FreeImage that inlcude different versions of libpng or libjpeg. In previous cases libjpeg was the culprit. As Andreas mentioned the problem is not trivial and you need to try to remove the conflicting symbols and then include the other library as static library. 

Have you found a solution to this yet? I am having the same issues. Wikitutde with Google VR SDK. If not, any advice on how to manually remove the conflicting symbols?

Thanks Phillipp,

I've looked into the google libraries "libCardboardSDK_{ARCHITECTURENAME}.a" and the WikiTude librarys e.g. libCommonLibrary.a-armv7-master using the methods outlined in the link from Andreas but can't find any reference to libjpeg, libpng or FreeImage. Is there a way to workout secifically what library would be causing the problem? I'm comfortable removing the library but just need to work out for sure which one is causing the issue.




Hi Philipp,

At this stage we're willing to pay for the time for one of your devs to help us out with debugging this issue if that's an option.



Hi Andrew,

I'm pretty sure looking at your warnings that the jsoncpp library is the culprit. This is included in libCommonLibrary.a . Can you try to compile Cardboard SDK without jsoncpp?

Thanks Philipp

Running the following command I, dont seem to see jsonccp within the the google libraries

ar -t libCardboardSDK_armv7.a | grep json










am I correct in assuming that jsonccp isn't included or will that be included inside a .o library?

Hi Igor,
We're evaluating a way to prevent those kind of problems. So far you would need to manually remove the conflicting symbols from on of the conflicting libraries.

I'm sorry that we have no solution in place yet.

Best regards,

Login or Signup to post a comment