Haxe Develop has that fatal bug of saying the string has length zero every time you compile. SO I was like fair enough maybe Moonshine is better, if i compile a html5 project it starts the first time, but then trying to compile anything else gives an error because node.js is already running. so its impossible to develop anything as you cant compile more than once.
Hello! Sorry you ran into issues. I’d recommend trying to get the basics first and then layering on more tools as you see fit once you have the foundation intact. Here’s a little write up to go from a hello world to a hello world with nodejs!
Create a hello world program and see if you can compile it, you can create an hxml for it (build.hxml):
-main Main
--js test.js
--cmd node test.js
Run it with:
haxe build.hxml
Now you can add nodejs as a library, first install it with haxelib:
haxelib git hxnodejs https://github.com/haxeFoundation/hxnodejs
Then add it to your hxml:
-lib hxnodejs
Run it again and you should be able to make edits and have it recompile and run each time.
Hope it helps!
ok that works thanks, but then I tried to compile openfl sample code for android, i tried two different one and got the same error:
Creating C:/HaxeToolkit/haxe/lib/openfl-samples/8,7,0/features/display3D/Stage3DCamera/Export/android/obj/obj/android-v7/__pch/haxe/hxcpp.h.gch…
C:/HaxeToolkit/haxe/lib/hxcpp/4,3,2/include/hxcpp.h:27:13: fatal error: ‘typeinfo’ file not found
27 | #include
Theres no way I can debug that and get the android target working. THe Haxe foundation is asking for money for something that doesnt work…on all fronts. Except maybe html5 but i can use javascript if im only targetting html5. Or if I use cordova i can target android
hxcpp 4.3.2 is missing some fixes for newer android ndks. hxcpp git has a lot of fixes that allow them to work properly, so it’s best to install the git version:
haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp.git
Seeing that you are using ‘Haxe Develop’, I guess you were previously a ‘flash’ developer,
However, it should be noted that “Haxe Development” is no longer updated, so it is recommended to use “vs code”, which is everyone’s current choice
ok thanks, ill try those suggestions.
I used to use a language which compiled to html5 and started the server as a seperate thread so the compiler didnt have to shut down and restart the server every time. In haxe you compile on the command line and you have to manualy shut it down with CRTL-C
how would someone just get it to compile and use the same server instance for the new code?
im assuming hundreds if not thousands of people have gone through using haxedevelop,Flashdevelop,moonshine, tried compiling OpenFL for android and just given up
ok it worlks great now.
i told the A.I. on VS Code to setup a dropdown menu with the different targets, it worked after i argued with it saying it didnt work at first.
THe haxe installer worked very well, with installing the github version.
It’s great when you get past the barriers , but they are too fearsome for mere mortals