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 13:33:44 -0800
On Feb 18, 2004, at 1:15 PM, Denis Stanton wrote:
Hi
can anyone explain why I get the above warning message when I compile
for deployment?
The main.m source file was generated for me and I haven't done
anything to mess it up, but when I compile I get the above error
message. This doesn't happen on the program I built following the
tutorial instructions in Bill Cheeseman's Cocoa/Vermont Recipes, but
it does happen when I compile my own program, even though the sources
from main.m are identical. Did I miss out some other setup step?
Using Xcode 1.1 on OS X 10.3.2
Here is the source file. The warning message obviously points to the
line beginning "return..", but what is wrong with it?
//----------------------------------------------------------
#import <Cocoa/Cocoa.h>
int main(int argc, char *argv[])
{
return NSApplicationMain(argc, argv);
}
//----------------------------------------------------------
Thank you for any insight you can provide
NSApplicationMain is defined like this
NSApplication.h:APPKIT_EXTERN int NSApplicationMain(int argc, const
char *argv[]);
Notice the const.
vince
Denis _______________________________________________
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.
_______________________________________________
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.