Re: passing arg 2 of 'NSApplicationMain' from incompatible pointer type
Re: passing arg 2 of 'NSApplicationMain' from incompatible pointer type
- Subject: Re: passing arg 2 of 'NSApplicationMain' from incompatible pointer type
- From: Vince DeMarco <email@hidden>
- Date: Wed, 18 Feb 2004 14:01:27 -0800
On Feb 18, 2004, at 1:55 PM, Denis Stanton wrote:
On Thursday, February 19, 2004, at 10:33 AM, Vince DeMarco wrote:
NSApplicationMain is defined like this
NSApplication.h:APPKIT_EXTERN int NSApplicationMain(int argc, const
char *argv[]);
Notice the const.
vince
Hi Vince
first let me congratulate you on the speed of response. six minutes,
according to the received times in Mail !
I see now that my code (which gets the warning message) has:
int main(int argc, char *argv[])
whereas the tutorial example has
int main(int argc, const char *argv[])
What I don't understand is how this discrepancy occurred. As far as I
recall the main.m code was generated by Xcode in both cases. Did I
make a correction to the generated code when I was using the tutorial
back in December, or has Xcode 1.1 introduced a subtle change in
omitting the "const"?
Looks like something changed in the XCode templates,
main should be generated like this
int main(int argc, const char *argv[])
{
/* lots of stuff here */
}
You might want to verify that this is the case, and if it is please
file a bug with Apple.
vince
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.