Can't build Heaps documentation Hello World example

My name is Nemo.

I discovered Haxe and Heaps in the last few weeks and am very interested in learning and using it.
Pleased to meet you all.

I have some knowledge in programming, but Haxe, Heaps, Hashlink and Visual Studio Code are completely new to me.

The problem:
I started by reading the documentation (https://heaps.io/documentation/home.html).

The installation went well but I can’t get the Hello World example to work. So maybe the installation didn’t went so well after all.

I created two files, "compile.hxml" and "Main.hx", and filled them with the content told in the documentation.

When building the application, I get that error message:

/home/nemo/haxelib/heaps/1,6,1/hxd/impl/TypedArray.hx:10: characters 27-50 : Warning : This typedef is deprecated in favor of js.lib.ArrayBufferView

/home/nemo/haxelib/heaps/1,6,1/hxsl/MacroParser.hx:170: characters 12-16 : haxe.macro.FunctionKind should be String

/home/nemo/haxelib/heaps/1,6,1/hxsl/MacroParser.hx:170: characters 12-16 : For function argument ‘f’

/home/nemo/haxelib/heaps/1,6,1/hxsl/MacroParser.hx:168: lines 168-185 : Void should be hxsl.ExprDef

/home/nemo/haxelib/heaps/1,6,1/hxsl/BatchShader.hx:3: character 1 : Build failure

Note that the first line was repeated 6 times in slightly different ways for different parts of the code, but I only wrote the last entry here.

I read (https://github.com/openfl/lime/issues/1299) that the typedef problem is linked to lime in some way (I am really not clear about what lime does), that it is solved in the dev version, and will be in the next release.

Gama11 advises to use the following line in the program to stop deprecation warnings: -D no-deprecation-warnings

When running the application again, I still get this:

/home/nemo/haxelib/heaps/1,6,1/hxsl/MacroParser.hx:170: characters 12-16 : haxe.macro.FunctionKind should be String

/home/nemo/haxelib/heaps/1,6,1/hxsl/MacroParser.hx:170: characters 12-16 : For function argument ‘f’

/home/nemo/haxelib/heaps/1,6,1/hxsl/MacroParser.hx:168: lines 168-185 : Void should be hxsl.ExprDef

/home/nemo/haxelib/heaps/1,6,1/hxsl/BatchShader.hx:3: character 1 : Build failure

The terminal process terminated with exit code: 1

From there, I have no idea what to do next. I searched on Google and on the Heaps community site to no avail.

My installation:
I run a Debian 9.

I installed Haxe 4.0.0-rc.3 from the source, using the instructions in the "BUILDING.md" file in "Haxe -> Build -> extra".

In that guide, we need to install OPAM (2.0.5) and OCaml (4.02.3) using a script.

I needed to install dependencies: PCRE, zlib, bubblewrap, neko, m4, mccs, camlp5, extlib. I also installed camlp4, but I am not sure it was really needed.

There was also other dependencies for Haxe installed with "opam install haxe --deps-only".

I installed haxelib (3.3.0).

I installed Visual Studio Code (1.37.1) and the "Haxe" and "Haxe Extension".

Finally, I installed Hashlink.

First of all I installed its dependencies with the following command: sudo apt-get install libpng-dev libturbojpeg-dev libvorbis-dev libopenal-dev libsdl2-dev libmbedtls-dev libuv1-dev

Then I build and installed it using "make all" and "sudo make install".

I then installed "hldx", "hlopenal" and "hlsdl" with "haxelib install".

As it is, the “hashlink” command doesn’t work, so it would seem that it was not installed correctly, but it also may be that there are no terminal command, I am not sure.

I suppose the solution is simple (it is most of the time…) and that is probably something I did wrong, therefore, sorry for the bothering.

If you need any more information I will happy to provide them.

And thank you a lot.

It looks like the Haxelib version of Heaps is not compatible with Haxe 4 rc.4 yet (*). Installing it from GitHub should solve that:

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

(*) You said you built Haxe from source, so it’s probably somewhere between rc.3 and rc.4, though closer to the latter if it was recent.

1 Like

Thanks for the fast answer Gama11, I am glad to say it worked without any problem.
Have a good day