• 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: Referring to Other Classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Referring to Other Classes


  • Subject: Re: Referring to Other Classes
  • From: email@hidden (Kris Rambish)
  • Date: Fri, 19 May 2006 22:44:27 +0000

Since I am building a framework I cannot include the header for the C++ classes in my wrapper.h (this is the file that is now public to applications using the framework).  Otherwise every application that uses my framework will have to be Objective-C++.  In addition, when I try to do this any application that is using the framework can never resolve the location of the C++ header files.

Kris

 -------------- Original message ----------------------
From: Andrew Farmer <email@hidden>
On 19 May 06, at 15:28, Kris Rambish wrote:
> Hi all,
>   I am construction a framework using Objective-C++, basically an
> Objective-C wrapper for a C++ class.  I keep getting an error when
> I compile: cannot find interface declaration for <object1>
>
>   What I have done is the following:
>
> ----------------------------------------------------------------------
> --------------
> wrapper.h
>
> #import <Cocoa/Cocoa.h>
> @class CpluspplusClass1, CpluspplusClass2;

Hold it right there. @class is used exclusively for Objective-C
classes. What you probably want to be doing here is #including the
header for the C++ class.



--- Begin Message ---
  • Subject: Re: Referring to Other Classes
  • From: Andrew Farmer <email@hidden>
  • Date: Fri, 19 May 2006 22:34:56 +0000
On 19 May 06, at 15:28, Kris Rambish wrote:
Hi all,
I am construction a framework using Objective-C++, basically an Objective-C wrapper for a C++ class. I keep getting an error when I compile: cannot find interface declaration for <object1>


  What I have done is the following:

---------------------------------------------------------------------- --------------
wrapper.h


#import <Cocoa/Cocoa.h>
@class CpluspplusClass1, CpluspplusClass2;

Hold it right there. @class is used exclusively for Objective-C classes. What you probably want to be doing here is #including the header for the C++ class.


Attachment: PGP.sig
Description: This is a digitally signed message part


--- End Message ---
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Referring to Other Classes
      • From: Derrick Bass <email@hidden>
  • Prev by Date: Re: Referring to Other Classes
  • Next by Date: [ANN] -- Ambrosia seeks Cocoa programmer
  • Previous by thread: Re: Referring to Other Classes
  • Next by thread: Re: Referring to Other Classes
  • Index(es):
    • Date
    • Thread