Can Haxe compile a windows app on it's own. Or would I need something like Nw.js too with it?

HaxeDevelop shows an option to compile for windows, but it never worked for me.

However I recently read through Nw.js so I am wondering if I want to program a simple windows application with haxe/haxeui, then would haxe alone be sufficient to make one. Or will I need help of something like nw.js to run it on windows? I also read about waxe. But it does seem to be active since a long time.

What doesn’t work? Remember that you need:

  • haxelib install hxcpp
  • install visual studio community
  • lime setup windows
    And then you can build for windows.

As I said it gives out errors with some libraries missing.
And language is not very clear.

Ok. I will try again this time. Will let you know.

I got this error. What does this mean?

what versions of haxe, openfl, lime are you using? Should be latest of all if you have the latest hxcpp.

haxe: 4.1.2
hxcpp: 4.1.15
lime: 7.8.0
openfl: 8.9.7

or try an older version of hxcpp, maybe 4.0.64 or 4.1.1 ?

Ok I have installed and got everything as you said. But cannot get out of that error

a2


However even though lime is not working here,
I don’t get any lime related issue while compiling openfl projects for html5 or flash.

For example this is the output I get in the haxedevelop output window which shows lime command is working fine:

Running process: C:\Program Files (x86)\HaxeDevelop\Tools\fdbuild\fdbuild.exe “D:\store\project\project.hxproj” -ipc 49f6bd14-6cb6-4330-aa91-5cfd6f3d3426 -version “4.1.0” -compiler “C:\HaxeToolkit\haxe” -library “C:\Program Files (x86)\HaxeDevelop\Library” -target “html5”
Building project
Running Pre-Build Command Line…
cmd: “C:\HaxeToolkit\haxe/haxelib” run lime build “project.xml” html5 -debug -Dfdb

Strange. Can you try haxelib run lime setup windows. Maybe your path to lime isn’t correct. But it seems that the haxelib one is working.

Did you install visual studio community ?

EDIT: keep an eye on this thread : Upgraded to Haxe 4.0.5 but OpenFl isn't coming along

my haxelib version is 4.0.2 and it isn’t in my haxelib list. I’ve never had it installed that way, it comes with haxe installation. I tried haxelib install haxelib just to see what happens, and haxelib version then gave me version 3.3.0 like you. It wouldn’t let me remove with haxelib remove haxelib 3.3.0 so I went in to HaxeToolkit/haxe/lib/ and deleted haxelib folder there and then my haxelib version was back to 4.0.2.

Maybe this wrong version of haxelib is the problem?

EDIT
I would try deleting the haxelib folder from HaxeToolkit/haxe/lib and then run haxelib run openfl setup again.

See this.
3.3.0 is the latest available

Why not the latest 4.0.2 is listed here?

I never installed haxelib that way, it comes with haxe installation. I don’t know what that is. It’s 4 years old.

EDIT:
Yeah, go delete that folder to remove it. that was for old haxe 3.
Then haxelib version should say 4.0.2

Yes I have visual studio community 2019 installed

When I use haxelib run lime setup windows , the command works. No error this time.

a3

And then running a project on haxedevelop selecting windows platform gives me error same as this thread:

Yes I have visual studio community 2019 installed

When I use haxelib run lime setup windows , the command works. No error this time.

a3

And then running a project on haxedevelop selecting windows platform gives me error same as this thread:

Error says :

Running process: C:\Program Files (x86)\HaxeDevelop\Tools\fdbuild\fdbuild.exe “C:\Users\xxxxxxxxxxxxxxxxxxx\source\win\New Project.hxproj” -ipc 13b0755f-ee75-46ac-b072-27be55abf66d -version “4.1.0” -compiler “C:\HaxeToolkit\haxe” -notrace -library “C:\Program Files (x86)\HaxeDevelop\Library” -target “windows”
Building New Project
Running Pre-Build Command Line…
cmd: “C:\HaxeToolkit\haxe/haxelib” run lime build “project.xml” windows -release -Dfdb
C:\Users\xxxxxxxxxxxxxxxxxxxxxxx\bin\windows\obj>setlocal enabledelayedexpansion
Warning: Could not find Visual Studio 2017 VsDevCmd
Missing HXCPP_VARS
Error: Could not automatically setup MSVC
Build halted with errors.
Done(1)

Ok. Thanks. I will install haxelib 4.0.2 then. Will let you know.

you shouldn’t have to install it.
It’s already installed with haxe.
Just remove the old version 3 by deleting the folder and then 4.0.2 will be your version.

But that might not be your problem with windows build. Make sure you have installed Desktop development with c++ with Visual Studio Installer (modify)

You might need to restart computer.

It looks like you might have setup the lime alias before Haxe switched to 64-bit Neko. Try running haxelib run lime setup -alias. Then, try to run this command again.