Where to add -Wall and -Wextra in Xcode 3.1.4

2019-05-07 07:59发布

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条回答
贼婆χ
2楼-- · 2019-05-07 08:16

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)

查看更多
登录 后发表回答