I am currently porting Haxe to Nintendo Switch homebrew (devkitA64), using hxcpp. I was able to run a hello world, and now I would like to write a small wrapper for the Switch homebrew C library libnx.
I started simple with a simple function: consoleInit(). For that, I wrote a Console class : https://pastebin.com/fQ3YPqKm
However I feel like this is wrong - I should not have to duplicate the class in two. The thing is that the cppFileCode directive only works on top of “real” classes, and not extern ones, which is why I had to make two classes (consoleInit is in switch.h).
Any pointers? Is there a way to add project-wide includes to avoid that scenario?