Re: Codewarrior ->Xcode port
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:
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