tags:

views:

189

answers:

2

I want to set some warning settings for my GCC compiler in Xcode (using GCC4.2), but I am unable to find a section in my Xcode build settings which lists the Warnings settings. Any idea?

For example, I am not seeing the screeshot posted in the answer for this post: http://stackoverflow.com/questions/711650/xcode-and-iphone-compiler-warning

A: 

Hey, yeah I pulled my hair out over this one too. It works only when you set mode to Device (iphone device base sdk), doesn't work for Simulator mode.

I am actually not sure if it's a bug or a feature..

One way to "circumvent" this is to edit project.pbxproj and add flags to corresponding sections manually - search for "iPhone Developer" (release/debug sections). You can add usual xcode gcc flags there or change the ones present.. like set GCC-WARN-UNUSED-VARIABLE (underscores) to NO for example. Once done, just reload the project.

Hope this helps. If you find a better way, please do post.

ttvd
A: 

I found the issue. The "Base SDK for All Configurations" in General section of the Project Info was set to iPhone Simulator 3.0. It has to be set to iPhone Device X.X for the Warnings to show up in Build.

Boon