(Solved) : HelloHashlink (infinite loop?) main()

I’m hoping someone else has run into this.

I’m following the starter tutorial to make sure everything’s working Hello hashlink but I get this strange error:


this doesn’t occur in the previous HelloWorld getting started tutorial.

I don’t yet have enough experience with heaps to understand what could be happing here, so I’m very much out of the loop on this one.

Thanks in advance for any help.


The Main.hx is:
class Main extends hxd.App {
override function init() {
var tf = new h2d.Text(hxd.res.DefaultFont.get(), s2d);
tf.text = “Hello Hashlink !”;
static function main() {
new Main();

And it is compiled and run with the following two commands:
haxe .\compile.hxml
hl .\hello.hl

with a compile.hxml of:
-cp src
-lib heaps
-lib hlsdl
-hl hello.hl
-main Main

Hm… that’s weird. Code, hxml-file and commands seem totally fine. Are you using the lastest version of Heaps, Haxe and HashLink?
Haxe 4.2.5
HL should be 1.12
And for Heaps (always) use the git version via:

haxelib git heaps https://github.com/HeapsIO/heaps.git

If that doesn’t help there are the HashLink issues site and the one for Heaps of course, also you can ask on our discord channel under “game frameworks”/#Heaps.
And give any other information that can be helpful, about your OS etc.

1 Like

Thanks for your help @AlienBuchner it helped me fix it, but not directly.

I have the following versions: haxe 4.2.5; hl 1.12.0; (had) heaps 1.9.1

What fixed this for me was installing heaps via the git above (haxelib git heaps https://github.com/HeapsIO/heaps.git), which gave me further odd “Window.hl.hx sdl.window” errors upon haxe compile, then deleting the entire HaxeToolKit\Haxe\lib\heaps* folder contents, and reinstalling via “haxelib install heaps”.

I have no idea why this worked but I have a working hl now. Thanks again @AlienBuchner ! :partying_face:

1 Like