Re: How to display Japanese in debug console?
Re: How to display Japanese in debug console?
- Subject: Re: How to display Japanese in debug console?
- From: Chris Hanson <email@hidden>
- Date: Mon, 26 Jun 2006 01:52:03 -0700
On Jun 25, 2006, at 7:01 PM, Norio Ota wrote:
But Carbon doesn't have NSString class, how do you think I define
NSString for using it in Carbon?
Do I need to set any flags of the build setting of the target in
Xcode?
This is the first time for me to use Cocoa function in Carbon
environment, so that I'm very sorry to bother you.
In order to make use of Cocoa functions within your code, you'll need
to do a couple of things.
First and probably most obviously, you'll need to link against
Cocoa.framework.
Next, you'll need to ensure your code is being compiled as Objective-
C or Objective-C++ rather than C or C++. You can do this by either
changing the file extension to .m for Objective-C or .mm to Objective-
C++, or by changing the file type of the file in Xcode's inspector
for the file to "sourcecode.c.objc" for Objective-C or
"sourcecode.cpp.objcpp" for Objective-C++.
Finally, you'll need to #import the appropriate header file in your
code to make the declaration visible to the compiler. You can always
just #import the framework header (e.g. <Foundation/Foundation.h> or
<Cocoa/Cocoa.h>) rather than an individual header.
One more thing: Because strings are so commonly used, Objective-C has
a shorthand for creating a constant instance of NSString: Just use an
@ in front of a constant C string, for example:
NSLog(@"Hello");
The effect of this is similar to the CFSTR() macro.
-- Chris
_______________________________________________
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