Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Eliminate Use of all_load #239
I love your library. Well done.
I am looking for a way to link with your library and not use -all_load for a variety of reasons including debugging purposes with other dependent libraries that I use (our own). I haven't looked into it, but i'm assuming that you do the -all_load to fix the catalog bug / linke bug with LCC. The linker fails when you have multiple architectures (armv6 and armv7) and you use the -ObjC linker flag.
Something like this error
ld: duplicate symbol OBJC_METACLASS$_RKJSONParser in /Users/ryanconnelly/Documents/pps/mxpos/ThirdParty/RestKit/libRestKitJSONParserSBJSON.a(RKJSONParser+SBJSON.o) and /Users/ryanconnelly/Documents/pps/mxpos/ThirdParty/RestKit/libRestKitJSONParserYAJL.a(RKJSONParser+YAJL.o) for architecture armv6
I know three20 came up with a creative way to avoid using the -all_load. They wrote an doc about it here:
Look at "Update2" for the "dummy class" solution which I find is the best option.
If you look in their source code on github you can see exactly how the used it.
Basically, you include a macro for each object file that only contains a category extension which fixes the link errors without using the -all_load linker flag.
Anyway, just thought I'd share that info. Thanks.
Reply to this email directly or view it on GitHub:
Looks like we just need to adapt this macro and use around all the categories, including the Vendor/ ones. Then we can drop -all_load.