iOS 5.x- > Objective-C ++でBinaryWriterとBinaryReader(GitHubのOpenFrameworksプロジェクトから)C ++クラスを定義して使用する方法を教えてもらえますか?
私がやること:
AppDelegate.h
#import <UIKit/UIKit.h>
#import "Poco/BinaryWriter.h"
@interface AppDelegate : UIResponder <UIApplicationDelegate>{
Poco::BinaryWriter *_myBinaryWriter;
}
@property (strong, nonatomic) UIWindow *window;
@end
AppDelegate.mm
#import "AppDelegate.h"
@implementation AppDelegate
@synthesize window = _window;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
_myBinaryWriter = new Poco::BinaryWriter(NULL, NULL);
[self.window makeKeyAndVisible];
return YES;
}
@end
しかし、mmファイルではコンパイルエラーがあります:
'Poco::BinaryWriter'の初期化に一致するコンストラクターがありません
何が間違っていて、何をすべきか?
OpenFrameworksのヘッダーへのpsパスはプロジェクトの設定で構成され、リンカーはPocoクラスを見ることができます。
ありがとうございます。