Re: How does the SDK selection affect my compiler settings?
Re: How does the SDK selection affect my compiler settings?
- Subject: Re: How does the SDK selection affect my compiler settings?
- From: James Bucanek <email@hidden>
- Date: Fri, 20 May 2005 14:55:59 -0700
Chris Espinosa wrote on Friday, May 20, 2005:
>On May 20, 2005, at 10:04 AM, James Bucanek wrote:
>> 1) How does the SDK selection affect the compiler behavior/flags?
>
>Generally it doesn't. It only affects the paths in which the
>compiler searches for headers and the linker searches for link
>libraries. It does set some preprocessor macros that declares what
>version of compatibility you expect, so some #ifdef paths may be
>taken using an SDK that are not taken otherwise, but no, GCC flags
>are not affected by SDK choice.
So I wonder why the compiler behaviour changes when I link against and SDK? A quick grep shows that there are a bunch of statements like
#pragma warning ( disable: 4244 )
scattered all over the system headers. I'm wondering if one of those is causing this particular warning to be set in the compiler. Of course, since I can't seem to find any kind of comprehensive list of warning numbers for gcc, I have no idea which one might do that.
>> 3) Thinking that at some point I might need to include non-ASCII
>> character in a literal CFString, how does one do it? I tried
>> @"string\u2026", but got an error that unicode characters were only
>> supported in C99. Can I use a UTF-8 sequence?
>
>I don't think so. You're probably going to have to define a C string
>constant that contains the escaped UTF-8 character sequence and
>create your CFString on the fly with CFStringCreateWithCStringNoCopy:
>
>if ([[anItem title] isEqualToString: CFStringCreateWithCStringNoCopy
>(kCFAllocatorNull, "Save As\226\128\172", kCFStringEncodingUTF8,
>kCFAllocatorNull])
Thanks, I think that would work just fine for the few occations that I'll need this.
Note that I've already worked around the issue with the menu item names by switching to tags -- which I should have done from the beginning, as I'll want to localize this application.
Thanks for the info,
James
--
James Bucanek <mailto:email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden