Re: NSString equivalent of CFSTR macro?
Re: NSString equivalent of CFSTR macro?
- Subject: Re: NSString equivalent of CFSTR macro?
- From: Ben Kennedy <email@hidden>
- Date: Mon, 4 Dec 2017 14:56:35 -0800
On Dec 4, 2017, at 2:53 PM, Rick Mann <email@hidden> wrote:
> I tried that. It doesn't work.
>
> MCP.m:262:54: Unexpected '@' in program
Weird. I just tried it here, using your exact example, and it worked fine under
Xcode 9.2. (I slapped it into my iOS app's
application:didFinishLaunchingWithOptions: as a quick and dirty test.)
#define NSSTR(s) (@ s)
#define kSomeCStringConstant "foo"
NSLog(@"foo is %@", NSSTR(kSomeCStringConstant));
Do you have some unusual circumstances in your build environment?
b
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden