I recently installed Haxe on Windows 7 (64 bit) using the default installer. After installing it, I tried creating these files in a folder called Haxe Examples:
compile.hxml
:
-js test.js
-main Test
Test.hx
:
class Test {
static function main() {
trace("Hello World !");
}
}
When I run compile.hxml by double-clicking on the compile.hxml
file, I get the following message in the terminal:
Error: Invalid class name for class Test{
What might be causing this problem?
I just realized that I accidentally put the source code of compile.hxml
in Test.hx
, and vice versa. I switched the names around, and the compiler is working now!