-all_load breaks my app

33 views
Skip to first unread message

JoshWright

unread,
May 29, 2012, 9:53:26 PM5/29/12
to Rdio API
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/joshinnorman/
Projects/app/libs/libvt_universal.a(vw_ctype-3279EF26D0C25F3A.o) and /
Users/joshinnorman/Projects/app/libs/
libvt_universal.a(vw_ctype-34AB9EC0B46D954C.o) for architecture i386


Is there any way to use the Rdio library without using -all_load?

Devin Sevilla

unread,
May 30, 2012, 2:05:45 PM5/30/12
to rdio...@googlegroups.com
On Tue, May 29, 2012 at 6:53 PM, JoshWright <joshin...@gmail.com> wrote:
> 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/joshinnorman/
> Projects/app/libs/libvt_universal.a(vw_ctype-3279EF26D0C25F3A.o) and /
> Users/joshinnorman/Projects/app/libs/
> libvt_universal.a(vw_ctype-34AB9EC0B46D954C.o) for architecture i386
>

I believe this is an issue with the library you are using,
libvt_universal.a. It is defining the symbol _vw_chartype_table_p
twice. This is a common issue that can occur with improper use of
header includes or implementing functions with the same name in two
places.

What is the name of the third-party library you are using? I'd like to
compile it myself and look at the symbol table.


> Is there any way to use the Rdio library without using -all_load?

The -all_load flag is required because the library uses categories.
See Apple Technical Q&A QA1490 for a detailed description.

--
Devin Sevilla
API Engineer, Rdio Inc.

JoshWright

unread,
May 30, 2012, 7:29:09 PM5/30/12
to Rdio API
Thanks Devin -

The third party library is a text-to-speech binary. We had to purchase
a license, so I don't think we'd be allowed to share it.

I'm certain that the issue is with that TTS library. The quality of
the code is pretty low so the duplicate functions doesn't surprise
me. But it serves its purpose & has no issues apart from this -
all_load flag.

Would be possible to directly load the Rdio framework? For example,
this doesn't work but maybe something like:

-force_load $(BUILT_PRODUCTS_DIR)/Rdio.framework

Devin Sevilla

unread,
May 31, 2012, 1:41:29 PM5/31/12
to rdio...@googlegroups.com
On Wed, May 30, 2012 at 4:29 PM, JoshWright <joshin...@gmail.com> wrote:
> Would be possible to directly load the Rdio framework?

Yes, I was able to compile and run my test iOS app using the -force_load option.

First remove the Rdio.framework from the 'Link Binary with Libraries'
build phase. Next in the 'Other Linker Flags', add the following
command:

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

You will need to change the path to match your setup. In my project,
Rdio.framework is in a 'contrib' folder. You were close with your
suggestion, the -force_load option needs a path to the Rdio object
file, not the framework directory.

This option should work for both the simulator and an iOS device since
Rdio object file contains the information for both architectures.

-- Devin

JoshWright

unread,
Jun 1, 2012, 9:23:54 AM6/1/12
to Rdio API
Bingo. That works perfectly. Thanks Devin
Reply all
Reply to author
Forward
0 new messages