Conditional compilation Openfl

Hi !

Is there a way to say to compile depending on the version of openfl

if (openfl>= 4.1.1)

Try this:

#if (openfl >= "4.1.1")


This should work for any haxelib, be careful, though, that this is String comparison, so 1.10.0 is “smaller” than 1.2.0 since “1” is less than “2”

We avoid double-digit versions in OpenFL and Lime, though, to help avoid this problem

Thanks , it works ! :slight_smile:

1 Like