• 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
pragma for compiling as Obj-C++
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pragma for compiling as Obj-C++


  • Subject: pragma for compiling as Obj-C++
  • From: Eric Johnson <email@hidden>
  • Date: Wed, 25 Feb 2009 12:24:15 -0800

Hi All,
I'm wondering if there is a pragma I can use to tell gcc to compile a file as Obj-C++ instead of C++. (I looked, but didn't find one.) Here's what I'd like to do:


// foo.h

#if MACOS
@class FooUI;
#endif

// stuff

// end file

// foo.cpp

#if MACOS
#pragma CompileAsObjC++
#endif

#include "foo.h"

// stuff

// end file

I want to use the extension ".cpp", so that I can use the file on Mac and Windows, but I need the file to be compiled as Objective-C++, since "foo.h" contains some objective-C syntax (that's #ifdef'd for Mac).

Thanks in advance,
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
  • Follow-Ups:
    • Re: pragma for compiling as Obj-C++
      • From: glenn andreas <email@hidden>
    • Re: pragma for compiling as Obj-C++
      • From: Tommy Nordgren <email@hidden>
    • Re: pragma for compiling as Obj-C++
      • From: Stefan Werner <email@hidden>
  • Prev by Date: Re: What is the difference between linked frameworks and other frameworks in an Xcode project
  • Next by Date: Re: pragma for compiling as Obj-C++
  • Previous by thread: Override configuration-specific settings in target templates
  • Next by thread: Re: pragma for compiling as Obj-C++
  • Index(es):
    • Date
    • Thread