Problem setting up Haxe/OpenFL on FlashDevelop/HaxeDevelop

Hello.

After trying to set up Haxe/OpenFL on FlashDevelop/HaxeDevelop multiple times I keep getting the same problem. When I create a new OpenFL project under the project’s properties under SDKs it says (Expected 3.1.3) when I have Haxe version 3.2.1 installed. I can fix this by removing the SDK and re-adding it for a project, but I’m not sure why it happens. If I switch to Haxe 3.1.3 and create a project it can’t even run, something to do with “ByteArraydata should be ByteArray”. So it seems 3.2.1. is the way to go.

And it works. On Neko it runs very quickly, but if I try to run on something like Windows it takes an extremely long time (probably around 5-10 minutes) including a lot of .cpp files. The next time I run it it’s faster. I don’t know if this is an issue or just how Haxe works. For every new project running the first time on Windows takes this long. Html and Flash seem fine, though, just like Neko.

So are these expected to happen, are either of them problems?

I wouldn’t worry about the project properties window when using Haxe. Usually the only thing that it takes any notice of is the location of the project.xml file. Everything else is generated from that. The windows compile will take a while the first time as you are compiling the whole lime / openfl haxe codebase. After that this is cached and you only compile your changes.

Can I then just copy an already compiled codebase from a different project to the new one, or does it not work like that?

I don’t think you can but I’ve never tried it myself.

If the two projects are very similar, it could work. Otherwise, it won’t. (They have to define exactly the same <haxeflag />s and import the same libraries.)

The trick is to avoid compiling to C++ unless you need to. Test your app in Flash or Neko so that you don’t have to wait.