Positive x Squared
Positive x Squared

Reputation: 47

No such file 'haxe' sublime text 3

I'm trying to compile haxe in sublime text 3 but I always get the error:

[Errno 2] No such file or directory: 'haxe'
[cmd: ['haxe', 'build.hxml']]
[dir: /home/bob/Desktop]
[path: /usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/bob/.local/bin:/home/bob/bin]
[Finished]

I'm running fedora 22 and have the Haxe tar extracted in my home folder and I also Ctrl+Shift+P and installed haxelib and Haxe packages. My two files are heloWorld.hx

class HelloWorld {
    static public function main() {
        trace("Hello World");
    }
}

and a build.hxml generated:

# Autogenerated build.hxml

# hellowWorld (js:hellowworld.js)
-main hellowWorld

js hellowworld.js

Why isn't haxe a build system option or it not compiling at all?

Upvotes: 1

Views: 272

Answers (1)

Positive x Squared
Positive x Squared

Reputation: 47

I found out I needed to add the haxe exacutables to /usr/bin/ because it is where paths are commonly looked for on linux. Another problem that occurs is that no matter if the class name is lower case or not I get the error:

Error: Could not process argument haxe -main HelloWorld
Class name must start with uppercase character
Build failed

Upvotes: 0

Related Questions