Reputation: 183
I tried haxe on MacOS, and setup the toolchain correctly, etc., but when i tried to compile a file, i got an error, so i tried again with an example in the tutorial (here: https://haxe.org/documentation/introduction/language-introduction.html), and got the same error, which is:
Type not found : HelloWorld
for the command:
haxe -main HelloWorld -js HelloWorld.js
to compile the file:
class HelloWorld {
static public function main() {
trace("Hello World");
}
}
What am i doing wrong?
Upvotes: 1
Views: 140
Reputation: 982
Make sure that your haxe source file is named as HelloWorld.hx
and your working directory is at where the source file is, when you run the compile command
Upvotes: 2