Learn Haxe

An easier way to learn how to use the Haxe core and related technologies.

Using a Haxelib in Haxe

Tagged with: Haxe

Haxe includes a built-in package manager, haxelib. You can install, upgrade, and manage libraries via the command-line.

Once you install a library through haxelib, you need to tell the compiler to include it when you compile. As mentioned on this page, you specify the library via the command-line:

haxe -lib <libName> ...

This includes the library code. Don't forget to add the relevant import ... statements to include library classes (if the library uses packages).

To include multiple libraries, just add more -lib <foo> arguments.