Compiling .cpp with Objective-C++ in only one target
Compiling .cpp with Objective-C++ in only one target
- Subject: Compiling .cpp with Objective-C++ in only one target
- From: David Dunham <email@hidden>
- Date: Wed, 16 Sep 2009 11:34:08 -0700
I've got a 3rd party library I'm trying to build for both Mac and
iPhone. I'm trying to use the same Xcode project, and creating another
target (lib3rdparty and lib3rdparty-iphone).
The 3rd party source code has an #ifdef for iPhone -- and presumably
their code all builds (they provided a .a but no project that builds
it).
The problem I'm running into is that their .cpp files include
#ifdef ENGINE_IPHONE
#import <UIKit/UIKit.h>
#endif /* ENGINE_IPHONE */
#ifdef ENGINE_MACOSX
#include <Carbon/Carbon.h>
#endif /* ENGINE_MACOSX */
This works fine on Mac builds, but on iPhone builds, they're including
Objective-C headers in a C++ build, and it fails horribly.
What I'm failing horribly at is finding where I can specify extension/
compiler mappings -- the place you say ".mm means Objective-C++." I
want to say ".cpp means Objective-C++" -- but only for the lib3rdparty-
iphone target.
David Dunham Macintosh Game Developer
GameHouse Studios +1 206 926 5722 www.gamehouse.com
"They said it couldn't be done but sometimes it doesn't
work out that way." -- Casey Stengel
_______________________________________________
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