Search code examples
objective-cxcode4

error during Xcode build: cannot specify both '-fobjc-arc' and '-fobjc-gc'


I've just downloaded a fresh codebase from SF, with a product set to target 10.8. It was written in the GC era.

When I build, I get this error:

cannot specify both '-fobjc-arc' and '-fobjc-gc'

ARC is turned off in both the target and project settings. None of the files have any flags in Build Phases.

So where is this flag turned on?


Solution

  • You can disable or enable ARC according to the picture below.

    Enable/Disable ARC

    To Enable ARC add f-objc-arc to the compiler flag of your implementation file or fno-objc-arc to disable it!

    Hope it helps!