Hello World, type not found hxd.App

Hi, new to Haxe and Heaps, and cannot get the first hello world to work or even get to try and compile it.
Hashlink appears to be set up as hl in the console does give the correct output.

When I try and ‘configure the default build task’ there is no option for haxe, even if i type haxe : active configuration in the input box, nothing comes up. I navigated to the directory in the command prompt and ran compile.hxml manually and that did nothing, no warnings in the cmd prompt and no new files generated in the project directory.

compile.hxml
indent preformatted text by 4 spaces
-lib heaps
-js hello.js
-main Main
-debug

Main.hx:
indent preformatted text by 4 spaces
package helloHeaps;

class Main extends hxd.App {
    override function init() {
        var tf = new h2d.Text(hxd.res.DefaultFont.get(), s2d);
        tf.text = "Hello World !";
    }
    static function main() {
        new Main();
    }
}

using haxe 4rc, lib folder has format, heaps, hldx, hlopenal and hlsdl.

tried re-install haxe and heaps to no avail. Any ideas?

Thanks for your time.

I know this post is a little over a month old now, but I had the same issue exactly as you’ve mentioned it. I was able to work around this by following the steps listed near ~20 minutes into this video. Hope this helps!

This does not help…

So according to your compile.hxml file your target is html5/js, right?

-lib heaps
-js hello.js
-main Main
-debug

Try to write you compile.hxml file exactly like this.
(And all things like HashLink and its libs are not relevant here (hldx, hlsdl, etc.)…)

Then open your terminal and make sure it “is” in the same folder where also your files Main.hx and compile.hxml are. (If it is not in the same directory, use cd yourpathtoyourdirectory)

Then run

haxe compile.hxml

(However when you use html5/js it will only create the script, like the hello world tutorial says. See end of this answer)


IDE / editor

When you speak of things like “configure the default build task” and “active configuration” are you using an IDE or editor? And if so which one?
When working with VSCode for instance there is a tiny button in the bottom left corner:
grafik
When you click on it you should be able to point to your local .hxml file.


more info

If this issue is still open, give as many relevant information as possible. Operating system you work on, your target platform (HashLink or html5/js) and if Haxe itself is successfully installed, being able to run and compile: Do commands like haxe and haxelib work in your terminal? (if you get an type not found error it most likely is)
And which version of Haxe do you use, and which Heaps version. (Though not mentioned on the official site :angry: you must use Heaps git version:

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

html5/js

And of course for the target html5/js you must create an index.html file, like said in the hello world tutorial.