Anderson Green
Anderson Green

Reputation: 31810

Using Haxe on Windows after installing with the automatic installer

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?

Upvotes: 0

Views: 157

Answers (2)

Joshua Granick
Joshua Granick

Reputation: 1047

It works here on my machine.

Can you open the command-prompt or terminal, and run haxe compile.hxml in that directory?

Perhaps something went weird with the file association for double-clicking the HXML file.

Upvotes: 0

Anderson Green
Anderson Green

Reputation: 31810

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!

Upvotes: 1

Related Questions