Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

idelovski

macrumors regular
Original poster
Sep 11, 2008
235
0
How do I set GCC build settings of an iPhone Project, namely Other C Flags? This item is present in Mac Cocoa/Carbon projects, but I can't find it in iPhone projects.

If I look at this screenshot in Apple's documentation it is different than Inspector window in my project. My project misses the whole GCC Code generation section.

I wanted to add -Wundeclared-selector flag I found in GCC documentation but I can only do it in the Inspector for each ObjC file, not on a project level. Any ideas?
 
Well, then something's wrong with my Xcode...

But it's good to hear that it might fix itself if I upgrade Xcode or when I move to SnowLeopard.
 

Attachments

  • BuildSettings.jpg
    BuildSettings.jpg
    104.8 KB · Views: 66
Whatever is wrong it's most likely your project, not Xcode and I don't think you need to upgrade to fix it.

The screenshot you show is missing the GCC Language settings.

What happens if you build a project from a template, say the navbar template? Does it build and run? Does it show the GCC Language settings?

What Base SDK have you set?
 
Thanks for reply, but I don't think we can do anything about it without some kind of upgrade.

All of my iPhone projects (40 or so) are created with one of the templates, all of them build just fine and run on both a device and in simulator. None of them (OK, I checked in 7 or 8 actually) displays GCC section in the build settings. Even the projects I downloaded from the web don't display GCC related info, so it must be something with my Xcode.
 
Yes, this did it. Thank you for your patience!

When I set active target to mach the Base SDK then GCC section magically reappears.

So many times I tried to run projects when they were set to Device SDK when noting was connected to my Mac, only to look at infamous Unexpected error dialog. Now I always switch back to Simulator before closing a project.

What a strange problem. Xcode is really some funny piece of software.
 
It's a bug. I don't know if it's fixed on SL, since I haven't installed it yet.

If the target SDK and the Base SDK don't match then all the GCC settings go to the bottom of the prefs window and you see them as raw settings.
 
... or completely disappear as with my version of Xcode. Anyway, thanks to you I can now enjoy the newfound warning switch. I had enough calling selector for -justDoIt when I had -justDoIt: defined in my class.
 
Not sure I understand completely what you suggest.

But, I want compiler to warn me if I don't have method declared if I'm passing its selector somewhere. I don't think you can call that "plugging your ears". That switch turns this warning ON, not OFF.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.