• 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: Calling Cocoa from C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling Cocoa from C


  • Subject: Re: Calling Cocoa from C
  • From: Peter Ammon <email@hidden>
  • Date: Mon, 25 Jun 2001 10:09:01 -0700

on 6/25/01 7:59 AM, Simon Stapleton at email@hidden wrote:

> Hi there.
>
> A question. I know I can call C/C++ from cocoa, but can I do the reverse?
> [...]

You can't call C++ from Cocoa (yet), but I expect that you could call Cocoa
from C++ using the extern "C" construction.

You can certainly call Cocoa from C using the method you suggest. Just make
sure to give any files with Objective-C code a .m extension so that gcc
knows to compile them with Objective-C.

HTH.

-Peter


References: 
 >Calling Cocoa from C (From: "Simon Stapleton" <email@hidden>)

  • Prev by Date: Re: Making views disappear and reappear
  • Next by Date: Re: Shared object between two nib file.
  • Previous by thread: Re: Calling Cocoa from C
  • Next by thread: calling cocoa from C
  • Index(es):
    • Date
    • Thread