Re: confused about ObjC vs C++ file naming conventions
Re: confused about ObjC vs C++ file naming conventions
- Subject: Re: confused about ObjC vs C++ file naming conventions
- From: Jean-François Brouillet <email@hidden>
- Date: Sun, 18 Oct 2009 01:39:51 +0100
Many Thanks! That solved the problem.
Best Regards
--
JFB
On 17 Oct 2009, at 22:42, Alastair Houghton wrote:
On 17 Oct 2009, at 20:35, Jean-François Brouillet wrote:
That is, I want to put my C++ wrapper in the pch file, as in:
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "ObjCCPPWrappers.h"
#endif
with ObjCCPPWrappers.h containing:
struct AutoPool {
NSAutoreleasePool * pool ;
AutoPool() { pool = [[NSAutoreleasePool alloc] init] ; }
~AutoPool() { [pool release] ; }
} ;
Leaving aside my general dislike of the use of prefix headers other
than as a compile time optimisation (i.e. *I* think you should
#import your "ObjCCPPWrappers.h" header everywhere you use it... and
then if that means every ObjC++ file in your source code you might
add it to the prefix header to reduce compile times), you need
#ifdef __cplusplus
#import "ObjCCPPWrappers.h"
#endif
I think.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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