Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running haxe.cmd directly fails on cpp/java/cs #51

Closed
Gama11 opened this issue Dec 30, 2019 · 2 comments
Closed

Running haxe.cmd directly fails on cpp/java/cs #51

Gama11 opened this issue Dec 30, 2019 · 2 comments

Comments

@Gama11
Copy link
Member

@Gama11 Gama11 commented Dec 30, 2019

Targets that have a post-compile haxelib run step fail to compile when calling haxe.cmd of a local lix installation directly (as vshaxe does for its tasks). Somehow it works through npx though:

> node_modules\.bin\haxe.cmd build.hxml
Error: Error: Library hxjava is not installed : run 'haxelib install hxjava'
Called from haxelib/client/Main.hx line 1222
Called from haxelib/client/Main.hx line 1424
Called from haxelib/client/Main.hx line 1456
Called from haxelib/client/Main.hx line 493

> npx haxe build.hxml
haxelib run hxjava hxjava_build.txt --haxe-version 4005 --feature-level 1
javac.exe "-sourcepath" "src" "-d" "obj" "-g" "@cmd"

I thought that it must be calling the wrong Haxelib in the first example, but explicitly putting it into the PATH doesn't help either:

set PATH=node_modules\.bin;%PATH%

So there must be some other difference. Could well be a Windows specific problem.

Related: https://community.haxe.org/t/vscode-with-lix-extension-compile-to-cpp/1826

@back2dos

This comment has been minimized.

Copy link
Contributor

@back2dos back2dos commented Jan 13, 2020

Ok, I found out how to make it work: when you set the PATH, be sure to make it absolute ;)

@back2dos back2dos closed this Jan 13, 2020
@Gama11

This comment has been minimized.

Copy link
Member Author

@Gama11 Gama11 commented Jan 13, 2020

Hmm... I could've sworn I tried that, but this might explain some things (such as me thinking that I had a working fix in vshaxe for a while... 🤦‍♂)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.