I tried something like this, but it doesn’t seem to work.
#if hxcpp
var shape:Shape = new Shape();
#end
And it isn’t listed here.
What’s the flag when I target windows? If there isn’t one, what should I do?
I tried something like this, but it doesn’t seem to work.
#if hxcpp
var shape:Shape = new Shape();
#end
And it isn’t listed here.
What’s the flag when I target windows? If there isn’t one, what should I do?
Not sure to understand. Haxe doesn’t export for a specific plateform, but for a specific language like cpp or javascript.
You can have a look on OpenFL, Kha, or Heaps. This frameworks can target many plateforms.
I’m not sure you can detect windows specifically without adding something yourself, but you can check all current defines with haxe.macro.Context.getDefines()
; you may find something there.
Try this:
#if cpp
var shape:Shape = new Shape();
#end
© 2018-2020 Haxe Foundation - Powered by Discourse