views:

97

answers:

1

I'm trying to figure out where to add extra warning flags like -Wall and -Wextra in Xcode, I'm using version 3.1.4 on Leopard. Apple's documentation is for an old version, if I follow their instructions it takes me to a completely different window than what they show. Also they have a screenshot of a checklist of specific warning flags, I can't figure out how to get to that or even if that's still around.

CLARIFICATION: I'm building an iPhone app... bbum pointed me to the right spot for an OS X app, but the options are different for an iPhone project and I don't see an obvious analogue.

+1  A: 

In the build settings editor (double-click either the project icon or an individual target in Xcode's project window), search for "Other". You should see "Other C Flags" and "Other C++ Flags". You can add any additional flags there.

(Note that you won't see either if you happen to have a project with no source files -- a project with no "compile source files" build phases)

bbum
Thanks, but after poking around a bit more I guess I needed to specify that I'm building for iPhone. I see the options you're talking about if I make a new OS X project but there's still no obvious analogue in that same list for my iPhone project. Is it even possible?
Purple Ninja Girl
Yes, you should see the same settings for iPhone as for Mac OS X apps, if a) you are looking at the Target build settings, not the Project settings; b) there are C/C++/Objective-C source files in your target, and c) you have a valid iPhone SDK installed and configured as the Base SDK.
cdespinosa
I double-checked all those conditions, and I'm still not seeing it. I'm (a) looking at the target settings and not the project settings (Get Info on the target entry (which does have a compile sources build phase) or Project -> Edit Active Target), (b) trying this on a project with Objective-C source files, and (c) the Base SDK is configured to iPhone Device 3.0.
Purple Ninja Girl
OK, I got it now. Apparently I need to set the Base SDK to iPhone *simulator* before the options will appear...
Purple Ninja Girl

related questions