bendytree bendytree - 4 months ago 25x
iOS Question

Alternative for all_load in XCode's Other Linker Flags

I'm adding Rdio to my iOS app and I'm stuck on this part of the installation:

Add -all_load under Other Linker Flags in the project build info

If I add that flag, then another third party library breaks giving me the error message:

ld: duplicate symbol _vw_chartype_table_p in /Users/josh/
Projects/app/libs/libvt_universal.a(vw_ctype-3279EF26D0C25F3A.o) and /
libvt_universal.a(vw_ctype-34AB9EC0B46D954C.o) for architecture i386

Is there any way to use the Rdio library without using -all_load? For example, I've tried
-force_load $(BUILT_PRODUCTS_DIR)/Rdio.framework
but it seems to have no effect.


force_load is exactly what you want - it allows you to load only that framework without messing with anything else. The problem is the exact syntax along with a few other unexpected tweaks to your settings.

-force_load syntax

Force load should be given the path to your object file, not the framework.

-force_load $(SOURCE_ROOT)/AppName/libs/Rdio.framework/Versions/Current/Rdio

Other Settings

  1. Remove Rdio.framework from the 'Link Binary with Libraries' build phase.
  2. Remove '/libs/Rdio.framework' from my LIBRARY_SEARCH_PATHS