开发者

How to set XCode4 profiler to use C99 language dialect?

I'm trying to profile my iPhone application using XCode4, iPhone SDK 4.0 (and 4.3) and iPhone simulator. Unfortunately I'm getting errors like this:

'for' loop initial declaration used outside C99 mode

The reason is known for me, all I have to do is to set "C Language Dialect" in project preferences to "C99". I've already done it and I'm able to build my app and run it in simulator without a problem. Unfortunately I can't profile my app, because I'm still getting this "C99 mode" error. It looks like XCode trying to build my app without "C99" dialect turned on when I press "Profile" button. Where I can开发者_如何学编程 change build-for-profiler preferences?


You probably changed the setting only for the "Debug" build profile. If you pull down the build options and select "Edit Scheme", you'll see by default the Profiling build command is set to use the Release build... either change that to Debug (which I usually do anyway), or go to the project build settings and make sure your setting is the same for Debug and Release (they should be in rows right next to each other).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜