• 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: Codewarrior ->Xcode port
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Codewarrior ->Xcode port


  • Subject: Re: Codewarrior ->Xcode port
  • From: Chris Espinosa <email@hidden>
  • Date: Tue, 10 May 2005 08:38:33 -0700

On May 10, 2005, at 7:52 AM, Bob Sabiston wrote:

Hello,

   I'm trying to port an application from Codewarrior to Xcode.  I think Xcode's compiler must be crazy strict, because I'm getting a lot of errors like :


invalid conversion from 'const unsigned char' to 'unsigned char'

initializing argument 1 of void RedAlert(unsigned char)


Is there a setting on the compiler to allow such things?  In this case it's calling a function RedAlert:


void RedAlert(Str255 message) {

}


like this:


RedAlert("\pThis isn't working");


I suspect you don't pass the -fpascal-strings flag:

file:///Developer/ADC Reference Library/documentation/DeveloperTools/gcc-4.0.0/gcc/Pascal-Strings.html

A Str255 is an unsigned char *, while a literal string is a char *.  gcc is telling you in its inimitable way that it's calling RedAlert with the literal string "backslash p t h i s space i s n apostrophe t space w o r k i n g".  RedAlert will read the slash as the length byte and produce somewhat unexpected results.

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

  • Follow-Ups:
    • Re: Codewarrior ->Xcode port
      • From: Chris Espinosa <email@hidden>
References: 
 >Codewarrior ->Xcode port (From: Bob Sabiston <email@hidden>)

  • Prev by Date: Re: Xcode 2.0 debugger problem
  • Next by Date: Re: "'char' type is unsigned" seems to be broken
  • Previous by thread: Codewarrior ->Xcode port
  • Next by thread: Re: Codewarrior ->Xcode port
  • Index(es):
    • Date
    • Thread