I’m trying to add the soundcloud API to an iOS app and it requires the linker flag -all_load. From reading, this linker flag seems to be pretty common.
However, if I add the flag, I get the follow error of duplicate symbols.
ld: warning: in ../../../libs/FreeImage/lib/iphone/freeimage.a, missing required architecture i386 in file
ld: warning: in ../../../libs/glu/lib/iphone/glu-iphone.a, missing required architecture i386 in file
ld: duplicate symbol _FT_Get_Advances in ../../../libs/freetype/lib/iphone/freetype.a(ftbase.o) and ../../../libs/freetype/lib/iphone/freetype.a(ftadvanc.o)
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 failed with exit code 1
Is there a way to avoid this duplicate symbol issue with freetype?
[UPDATE FIX]
For anyone curious on the “fix”, don’t use -all_load and instead use -force_load . This way it just effects the lib you’re trying to load (in my case SoundCloudAPI.a)