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: Tommy Nordgren <email@hidden>
- Date: Mon, 26 Jun 2006 19:51:51 +0200
26 jun 2006 kl. 15.17 skrev Norio Ota:
I'm sorry but I got 2000 compile errors. I don't know what was
wrong, so I'll show you the files I added to my Xcode project and
the first line of error message out of the 2000 errors.
---------------- CocoaFunctions.h ----------------
#include <Carbon/Carbon.h>
#include <Cocoa/Cocoa.h>
extern void DebugStringInJP ( CFStringRef cfStr );
---------------- CocoaFunctions.m ----------------
#import "CocoaFunctions.h"
void DebugStringInJP ( CFStringRef cfStr )
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSLog ((NSString*) cfStr);
[pool release];
}
The errors occurs because you includes Cocoa headers in a header
that is used by multiple languages.
Put #import <Cocoa/Cocoa.h> in the implementation file instead.
Or if needed, put the include of Cocoa inside #ifdefs
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
ALWAYS USE IMPORT for Cocoa . Cocoa header files don't have include
guards
-------------------- the first error messages out of 2000
----------------------------
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/
Foundation.frameworks/Headers/NSObjCRuntime.h:60: error expected
unqualified-id before '@' token
Thank you for your time.
norio
------------------------------------------------------
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
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