Using Three20 with another library and conflicting linkage flags
Asked Answered
C

1

3

I'm trying to add Three20 to my project, but the -ObjC and -all_load flags are messing with another library I'm using. The other library is ZXingWidget for barcode reading, but I don't think that part is relevant.

I'm reasonably sure the answer is to use force_load instead of all_load and then point to my three20 libraries, but I can't get it to work.

Here's what i'm using now:

-force_load ../facebook-three20/Build/Products/Debug-iphonesimulator/*.a

But I get an errno=22 build fail immediately.

Even if I get the force_load to work, the -ObjC flag causes issues all by itself. How am I supposed to have different flags for different libraries? I don't see a way to put build flags on the actual libraries.

EDIT: So I just added each of the .a libraries with force load, and it'll compile, but it still gives me the unrecognized selector with some internal call from Three20 that I had before I did the force_load. Are there libraries I'm missing, or am I doing this wrong?

Cramoisy answered 11/8, 2010 at 22:5 Comment(4)
What are the unrecognised selectors - sounds like you might be right and you're just missing a library?Killiecrankie
It was something in the Photo viewer stuff. The libraries i included were: libThree20, libThree20Core, libThree20Network, libThree20Style, libThree20UI, libThree20UICommon, and libThree20Navigator.Cramoisy
-force_load is appropriate, it's a fine grain control available since XCode 3.2, but we need the exact errors you are getting to give help.Mazurka
I believe it has something to do with the -ObjC flag. Is there anyway I can use that on only the Three20 libraries and not the other? I'll accept an answer that answers that.Cramoisy
C
2

Apparently this is related to a bug in XCode 3.2 with how the flags work, and XCode 4 fixed it. :\

Cramoisy answered 20/8, 2010 at 18:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.