What is compiler flag when outputing to windows platform?

(Knight52) #1

I tried something like this, but it doesn’t seem to work.

#if hxcpp
  var shape:Shape = new Shape();

And it isn’t listed here.

What’s the flag when I target windows? If there isn’t one, what should I do?

(david mouton) #2

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.

(Rudy Ges) #3

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.

(Michael Bickel) #4

Try this:

#if cpp
    var shape:Shape = new Shape();