Failed to compile Haxe/FeathersUI project in Hashlink

With limited understanding to Hashlink to install and build ( Getting started with Haxe/HashLink - Haxe - The Cross-platform Toolkit), I installed Hashlink and tried against the given example (in linked page).

That went well. I able to compile “hello.hl” and able to run with hl.

When I tried to compile a Haxe/FeathersUI project (which has GUI) to Hashlink, however I starts having following error:

>haxelib run lime build hl
Warning: Could not find template file: bin/hl/Windows64

Failed to open "bin/hl/bin/NewHaxeFeathersUIProject.exe"

(The Haxe/FeathesUI project has its standard project.xml configuration file, and I need OpenFL/Lime to use that during compilation thus I ran haxelib run lime build hl)

I’m unable to understand what else I needs to provide to overcome the Could not find template file: bin/hl/Windows64 error.

The Lime (Github - development branch) ndll/Windows64 folder has following files for me:

  • lime.hdll
  • lime.hdll.hash
  • lime.ndll
  • lime.ndll.hash
  • lime-debug.ndll
  • lime-debug.ndll.hash

I see that you’re looking at the wrong directory here. It’s saying that it can’t find files in this directory:

[lime repo]/templates/bin/hl/Windows64

That’s where Lime’s bundled HashLink executable (and .hdll files) can be found. If it’s not there, or empty, you can to run lime rebuild hl -clean -release -nocffi (or you can copy the files from a recent Lime nightly build from GitHub Actions).

1 Like

Thank you @joshtynjala ! That worked correctly! I can build now without an error.

However, I was expecting output as .hl file instead of an .exe - but maybe that is what happens when used with OpenFL/Lime.

Yes, OpenFL’s build for HashLink generates more than just the .hl file, so that what you get in the output directory will be closer to what actually needs to be distributed to users on the same operating system that you built on. For instance, on macOS, you’d get it all bundled into .app file.

The .exe is just a copy of hl.exe. And hlboot.dat is a special filename that the HashLink executable looks for when it doesn’t receive a command line argument to run a specific .hl file. It’s just a .hl file that’s been renamed to hlboot.dat. So hlboot.dat can be renamed back to something like MyApp.hl, if you only want the .hl file, for some reason.