- Open Xcode;
- Create new project from template
macOS "Cocoa Application"; - rename
Supporting Files/main.mtoSupporting Files/main.mm - Go to
Project Build Settings->Search Paths->Header Search Pathsand add:- full path to
hx.NativeModule/hx/out/lib/cpp-mac-64/includedirectory & set "recursive" - full path to
your-haxelibs/hxcpp/3,4,64/includedirectory & set "recursive"
- full path to
- Go to
Target Settings->Generaltab ->Linked Frameworks and Librariesand drag-n-drophx.NativeModule/hx/out/lib/hx.fat-mac.ainto there (or you can and any combination of libs fromhx.NativeModule/hx/out/lib/cpp-mac-*/hx.*.afor any arch. I use the fat-lib for example.) - Open
Supporting Files/main.mmand:#import <hxcpp.h>(orHxcppConfig.hfromout/lib/cpp-mac-*/)#import "Foo.h"HX_TOP_OF_STACK hx::Boot(); __boot_all();into the body of methodmainfzzr::example::Foo_obj::test();as next line after__boot_all()
That's all.