Skip navigation.
 
mlRe: Calling an Obj-C method from a C++ class, how?
FROM : Roni Music
DATE : Thu Oct 07 16:18:56 2004

----- Original Message -----
From: "Karin Kosina" <karin.<email_removed>>
To: "Rolf Nilsson" <<email_removed>>
Cc: <<email_removed>>
Sent: Thursday, October 07, 2004 3:25 PM
Subject: Re: Calling an Obj-C method from a C++ class, how?


> On Thu, 7 Oct 2004 15:17:48 +0200, Rolf Nilsson <<email_removed>> wrote:
>
> > My problem is how to call an Obj-C method from a C++ class.
>
> Objective-C++ is your friend. :)
>
> Rename your .cpp file to .mm, and simply do the usual magic:
> [m_pMyControllerCocoaObj aCocoaMethodWithTwoArguments:foo
>                                                                     
>                        anIntValue:bar];



how could I miss that?

>
> Or did I misunderstand what you're trying to do?


No but I'm a C++ guy, I never got what you suggest to work because I forgot to include the controller class header file
and got compile error that I didn't understand so tried a difficult solution

Works fine now, thanks!

btw, I allready use Objective-C++


Rolf

>
> --
> We are Elektropeople for a better living.
>
> Karin Kosina, KSC (vka kyrah)
> http://kyrah.net

Related mailsAuthorDate
mlCalling an Obj-C method from a C++ class, how? Rolf Nilsson Oct 7, 15:17
mlRe: Calling an Obj-C method from a C++ class, how? Karin Kosina Oct 7, 15:25
mlRe: Calling an Obj-C method from a C++ class, how? Roni Music Oct 7, 16:18