I have an app that works with and without the linker flag. However, without the linker flag, I get a very different behaviour when adding data to a view.
-
1bensarz, you get a different behaviour without the linker flag... What does that mean?? Different how?– Adil HussainJun 20, 2017 at 13:12
1 Answer
This flag causes the linker to load every object file in the library that defines an Objective-C class or category. While this option will typically result in a larger executable (due to additional object code loaded into the application), it will allow the successful creation of effective Objective-C static libraries that contain categories on existing classes.
From this Technical Q&A
-
2Great! Thank you. Is this caused by the fact that we are using GCC 4.2 as a compiler? Would using LLVM GCC 4.2 or LLVM Compiler 2.0 solve the problem? Or am I mixing up stuff that shouldn't be mixed? Jul 8, 2011 at 20:25
-
I think that the behavior is the same with both compilers (besides, I don't know if there are 2 different linkers)...– sergioJul 8, 2011 at 20:35
-
4Does this mean that you would never need
-ObjC
in anything other than a library / SDK? I.e. you should never need to use it in an actual app target?– RobertFeb 24, 2014 at 15:20 -
2No, this means you need -ObjC in any project implementing a library that has a category or embedded framework in it Jan 8, 2016 at 0:20
-