pragma for compiling as Obj-C++
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