• 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: Re[2]: C++ in a Cocoa App - How Hard is THAT?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re[2]: C++ in a Cocoa App - How Hard is THAT? (From: Lance Drake <email@hidden>)

  • Prev by Date: Re: C++ in a Cocoa App - How Hard is THAT?
  • Next by Date: Re: C++ in a Cocoa App - How Hard is THAT?
  • Previous by thread: Re: Re[2]: C++ in a Cocoa App - How Hard is THAT?
  • Next by thread: Re: C++ in a Cocoa App - How Hard is THAT?
  • Index(es):
    • Date
    • Thread