• 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: passing arg 2 of 'NSApplicationMain' from incompatible pointer type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: passing arg 2 of 'NSApplicationMain' from incompatible pointer type
      • From: Denis Stanton <email@hidden>
References: 
 >passing arg 2 of 'NSApplicationMain' from incompatible pointer type (From: Denis Stanton <email@hidden>)

  • Prev by Date: passing arg 2 of 'NSApplicationMain' from incompatible pointer type
  • Next by Date: NSArchiverArchiveInconsistency ???
  • Previous by thread: passing arg 2 of 'NSApplicationMain' from incompatible pointer type
  • Next by thread: Re: passing arg 2 of 'NSApplicationMain' from incompatible pointer type
  • Index(es):
    • Date
    • Thread