すべての .m ファイルを .mm に変更せずにこれを行うという言い方はありますか?
わかった。答えを実装しようとしていますが、問題があります。以下の私のObjective C++ .hと.mmを見てください
Objective-C++ - IDCaptureTemplateCommand.h:
#include "Template.h"
@interface IDCaptureTemplateCommand : NSObject
@property (nonatomic, strong) IDCaptureTemplateCommand *IDCaptureTemplateCommand;
@end
Objective-C++ - IDCaptureTemplateCommand.mm:
#include "IDCaptureTemplateCommand.h"
@implementation IDCaptureTemplateCommand
- (id)init
{
self = [super init];
if (self) {
self.captureTemplateCommand = [[IDCaptureTemplateCommand alloc] init];
}
return self;
}
@end
Objective-C - IDCameraViewController.h
#import <UIKit/UIKit.h>
#import "IDCaptureTemplateCommand.h"
@interface IDCameraViewController : UIViewController <UINavigationControllerDelegate>
@property (nonatomic) IDCaptureTemplateCommand *captureCommand; //ERROR - Unknown type name 'IDCaptureTemplateCommand'
@end