• 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: Eric Albert <email@hidden>
  • Date: Fri, 7 Oct 2005 20:44:46 -0400

On Oct 7, 2005, at 8:21 PM, Lance Drake wrote:

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.  

Can you show it as "test_main.mm" in your example, then, just so we'd feel a bit more comfortable with it? :)

The page at <http://developer.apple.com/releasenotes/Cocoa/Objective-C++.html> has lots to say about this topic - but, so far, I can't get it happen for me.  For instance - at the beginning of the '.m' file in which I would like to refer to the C++ object - there's an error generated with the sequence: 

// ---------------------
// TEST_MAIN.m

#import <Cocoa/Cocoa.h>

class myCPPfile;
...
...

ERROR: /Volumes/dev/CPP_TEST/TEST_MAIN.h:11: warning: data definition has no type or storage class

That error is from your header file, not your source file.  What's line 11 of TEST_MAIN.h?  Also, just to speed things up, can you include the full line containing the compiler invocation from Xcode's detailed build log?

-Eric

 _______________________________________________
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: Defining "Environment" build settings
  • Next by Date: Re: C++ in a Cocoa App - How Hard is THAT?
  • Previous by thread: Re[2]: C++ in a Cocoa App - How Hard is THAT?
  • Next by thread: Re: Re[2]: C++ in a Cocoa App - How Hard is THAT?
  • Index(es):
    • Date
    • Thread