The -fno-objc-arc
flag is for the compiler, not for the linker. It tells the compiler that your Objective C code will be doing all the releasing and retaining manually. This is necessary because the newly added ARC mode prohibits explicit use of retain
, release
, autorelease
, dealloc
, and so on; you cannot call them even through a selector.
Converting all your code to ARC may be a large task, so the compiler supports both the old and the new style of code. You must tell the compiler if the file you're compiling is old or new; you do it by passing the -fno-objc-arc
flag.
There are many other compiler flags. They let you control the way the code is compiled and optimized, the way the errors and warnings are reported back to you, the paths where your headers are located, and so on. Type man gcc
in the terminal window to see the list of compiler options.