I would like to add two compiler flags, one for ARC (-fno-objc-arc) and one for warning (-w). Anybody know how to add two compiler flags in the Xcode build phase for a particular file?
4 Answers
Add the compiler flags under your Project -> Target -> Build Phases, just separate the flags by a space.

5 Comments
Jim
If he does it in the build settings, it will apply to all files. He wants to do it for a particular file.
danielbeard
Sorry, meant build phases, my image reflects this. I have also updated my answer.
Georgi Boyadzhiev
Hello, what to do if the file that I want to suppress is a header file?
Gregory Fenn
I need flags: "-I/usr/local/opt/libgcrypt/include -I/usr/local/opt/libgpg-error/include -L/usr/local/opt/libgcrypt/lib -lgcrypt -L/usr/local/opt/libgpg-error/lib -lgpg-error" but these files can't be found in the finder window that comes up when I add a compile source... any ideas? I just want to paste these flags.
danielbeard
@GregoryFenn go to Build Settings > Linking > Other Linker Flags, and put those there.