By default, each used haxelib version is automatically added as flag, e.g. when you add -L actuate, the compiler adds -D actuate=1.8.7. To test if a library exists in current context, use #if actuate. To check a specific haxelib version, use the operators, for example #if (actuate <= "1.8.7").
I've heard that #if (actuate <= version("1.8.7")) is better, but I can't seem to find version() documented anywhere in the manual. This seems like the place where I should be able to find it, though.
https://haxe.org/manual/lf-condition-compilation.html#haxelibs
I've heard that
#if (actuate <= version("1.8.7"))
is better, but I can't seem to findversion()
documented anywhere in the manual. This seems like the place where I should be able to find it, though.