Skip to content
Robert Konrad edited this page Apr 28, 2020 · 6 revisions

When compiling for Windows you can choose one of five graphics APIs using the -g or --graphics command line switch: direct3d9 (required for Windows XP support), direct3d11 (default), direct3d12, opengl or vulkan.

You can also choose one of two audio APIs using the -a or --audio switch: directsound (required for Windows XP support) or wasapi (default).

Visual Studio support goes back to 2010 but only 2017 and 2019 are actively tested, you can switch using -v or --visualstudio: vs2010, vs2012, vs2013, vs2015, vs2017, or vs2019 (default).

In Kode Studio and vscode with the Kha Extension Pack predefined start configurations for all graphics APIs exist with everything else using the default values.

Example command to build a Windows project for Visual Studio 2017 with Direct3D12:

node Kha/make -g direct3d12 -v vs2017

This cross-compiles your Haxe program to C++ which you can then compile in the corresponding version of Visual Studio by opening the sln file in build/windows. You can also compile a binary directly by appending the --compile parameter but this also requires an installation of Visual Studio with C/C++ support (which can be selected in its installer) or the Visual C++-Buildtools.

Clone this wiki locally