• 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: More fun with C++
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More fun with C++


  • Subject: Re: More fun with C++
  • From: "Herb Petschauer" <email@hidden>
  • Date: Thu, 3 Apr 2008 09:27:05 -0700

You know I actually gave the wrong example there :-)

It's not the extern "C" it is just the

#ifdef __cplusplus

C++ stuff

#endif

I do this all the time (honest).  This will compile when included from
a ".m" file because  _cplusplus won't be defined.

Hopefully I've got it right this time (post coffee) ;;-)

-H.

On 03/04/2008, Jens Alfke <email@hidden> wrote:
>
>  On 3 Apr '08, at 9:05 AM, Herb Petschauer wrote:
>
>
> > #  ifdef __cplusplus
> > extern "C" {
> > #  endif
> >
>
>  That won't help if the header is using C++-only syntax like namespaces and
> classes. You just can't #include that stuff from a C or Obj-C source file.
>
>  —Jens
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: More fun with C++
      • From: Scott Ribe <email@hidden>
References: 
 >More fun with C++ (From: Brad Peterson <email@hidden>)
 >Re: More fun with C++ (From: Paul Thomas <email@hidden>)
 >Re: More fun with C++ (From: "Herb Petschauer" <email@hidden>)
 >Re: More fun with C++ (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: More fun with C++
  • Next by Date: Objective-C Instance Variable Names
  • Previous by thread: Re: More fun with C++
  • Next by thread: Re: More fun with C++
  • Index(es):
    • Date
    • Thread