Ah, nvm, user error. I'm an idiot. It's not a #defined string. It's:

static const char* const kSomeCStringConstant      = "foo";


> On Dec 4, 2017, at 14:56 , Ben Kennedy <[email protected]> wrote:
> 
> On Dec 4, 2017, at 2:53 PM, Rick Mann <[email protected]> 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
> 


-- 
Rick Mann
[email protected]


_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to