• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to display Japanese in debug console?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >How to display Japanese in debug console? (From: Norio Ota <email@hidden>)
 >Re: How to display Japanese in debug console? (From: Damien Bobillot <email@hidden>)
 >Re: How to display Japanese in debug console? (From: Damien Bobillot <email@hidden>)
 >Re: How to display Japanese in debug console? (From: Norio Ota <email@hidden>)
 >Re: How to display Japanese in debug console? (From: Steve Sisak <email@hidden>)
 >Re: How to display Japanese in debug console? (From: Norio Ota <email@hidden>)
 >Re: How to display Japanese in debug console? (From: Chris Hanson <email@hidden>)
 >Re: How to display Japanese in debug console? (From: Norio Ota <email@hidden>)

  • Prev by Date: Re: How to display Japanese in debug console?
  • Next by Date: Re: Ambiguous Conversion error
  • Previous by thread: Re: How to display Japanese in debug console?
  • Next by thread: Re: How to display Japanese in debug console?
  • Index(es):
    • Date
    • Thread