Re: Re[2]: C++ in a Cocoa App - How Hard is THAT?
Re: Re[2]: C++ in a Cocoa App - How Hard is THAT?
- Subject: Re: Re[2]: C++ in a Cocoa App - How Hard is THAT?
- From: "Corey O'Connor" <email@hidden>
- Date: Fri, 7 Oct 2005 18:17:03 -0700
On 10/7/05, Lance Drake <email@hidden> wrote:
> Good Golly! Thanks so much for the immediate response and especially
> helpful instructions.
>
> The file has a '.cpp' suffix. It's already compiling OK - as far as I
> can tell - it seems more like the big problem is in making a reference
> to that thing from out of the Obj-C world. As a test, I changed it to
> '.mm' - but nothing is behaved any differently.
> // ---------------------
> // TEST_MAIN.m
>
> #import <Cocoa/Cocoa.h>
>
> class myCPPfile;
ah! That syntax is only for a forward declaration. In order to use
class myCPPfile you have to include the header file with the full
class declaration:
#include "myCPPfile.h"
Where myCPPfile.h is something like:
class myCPPfile
{
// property declarations here..
};
Hope that helps!
--
-Corey O'Connor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden