Re: Calling Cocoa from C
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