• 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: 2933 errors!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2933 errors!


  • Subject: Re: 2933 errors!
  • From: Daniel Child <email@hidden>
  • Date: Thu, 08 Dec 2005 01:47:30 -1000

THANK YOU! I needed the m extension and hadn't even noticed that PB automatically gave me a .c.

On Thursday, December 8, 2005, at 12:47 AM, Timothy J. Wood wrote:



On Dec 8, 2005, at 2:38 AM, Daniel Child wrote:

Hi All,

I am stumped. I am trying to build a menuless app, one that loads a window the user interacts with. Since NSApplicationMain seems to expect a particular "MainMenu.nib" I tried simulating the process as follows:

/* This is the default source file for new Cocoa bundles. */

/* You can either fill in code here or remove this and create or add new files. */

#import <Cocoa/Cocoa.h>

int main(int argc, const char *argv[])
{
[NSApplication sharedApplication];
[NSBundle loadNibNamed:@"TestPanel" owner:app];
[NSApp run];
return 0;
}

I tried cleaning targets. I checked the prefix header and it includes AppKit and Foundation (created automatically). I tried selecting and not selecting the AppKit and Foundation frameworks among the resource files. I even tried commenting out everything. To give you an idea of the errors, here are the first few.


This looks like you are trying to build for C++ or ObjC++. You either need to build for ObjC (file extension of .m) or, if you do want ObjC++, add extern "C" around the Cocoa.h, and make sure your file has a .mm extension.

-tim


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Re: 2933 errors! (From: "Timothy J. Wood" <email@hidden>)

  • Prev by Date: Re: 2933 errors!
  • Next by Date: menu-free app
  • Previous by thread: Re: 2933 errors!
  • Next by thread: menu-free app
  • Index(es):
    • Date
    • Thread