Can't get Haxe and OpenFL Working on Mac OR Windows 10!

Hi everyone,

I am extremely frustrated because I’ve been spending hours now trying to get Haxe Develop working on EITHER of my computers (preferably both). I’m new to Haxe and related, and I am currently sitting at a station where I’m stuck with a newly set up Windows 10, which I’ve also never used before and makes things more annoying.

So I have Windows 10 on the monitors and my MacBook Air in front of me. For the MacBook, it’s already problematic enough all the time when I run things on my Parallels Windows 7 virtualization. The whole screen glitches up after giving me a warning about a problem with d3d11.dll. I downloaded it from the first Google result, but it won’t let me copy paste or drag and drop the file into the System 32 folder. Do I try a chmod for the permissions or something?

Also, do I lose much from practicing with Haxe using Sublime Text or XCode? If not, how do I get it to work with those? I’ve installed the package for Haxe via the package manager in Sublime Text (still talking about my Mac, by the way), but when I try to run a simply file that makes a box (or a Hello World, let’s say), it gives me the error:

class Main extends Sprite {
^
SyntaxError: invalid syntax
[Finished in 0.4s with exit code 1]
[shell_cmd: python -u “/Users/Ben-Kyou/Desktop/Main.hx”]
[dir: /Users/Ben-Kyou/Desktop]
[path: /usr/bin:/bin:/usr/sbin:/sbin]

Note that I tried simply making a Main.hx on Desktop and building that. I understand I probably need to make more files but please help me out with this if you can. I am willing to learn (and deal with) a set of bash commands to learn for using with Sublime or Xcode if it allows me to easily code in Haxe and OpenFL without my Windows virtualization.

Now for the Windows 10 on the Windows desktop computer:

haxelib.exe not found in SDK path

That’s the error I get trying to build a simple Hello World in Haxe Develop, this time via the proper default folder hierarchy with assets, bin, src --> Main.hx, the project.xml…

I’ve tried a lot of Google troubleshooting, installing VS 2015 community just because, even installing an android development studio program that was really heavy and took forever, hoping it would help. I can’t run any haxelib commands because it says that command doesn’t exist. I’ve tried using Appman but it just gives me an error when I check those boxes and try to install stuff.

I am at my wit’s end!

Please let me know any more info you might need to help me out.

UPDATE

Okay I eventually sort of figured it out on Windows 10, I had forgotten/didn’t realize the final step of the “setup” command for openfl.

But my Mac problem still persists. Do any of you use FlashDevelop or HaxeDevelop on Mac?

For the dll issue, should I chmod the System32 folder or something in order to replace the dll? I keep getting denied. I run as administrator whenever applicable, but it still brings me to a point where it says I don’t have permission.

I have not used FlashDevelop on a Mac, I personally use SublimeText with the Haxe bundle on macOS or Linux, though I don’t get code completion (but at least I get code coloring). I also build straight from the terminal, I haven’t used SublimeText to do that

1 Like

Would you please teach me how to do everything via Sublime and Terminal? It would be INCREDIBLY helpful. I really need to be able to do this stuff on my Mac ASAP :slight_smile:

1 Like

I think a tuto for this it will be great!

For Terminal, have you tried these?

> openfl setup mac
> openfl create DisplayingABitmap
> cd DisplayingABitmap
> openfl test neko

If so, which one gives an error? (If it’s the first one, try “haxelib run openfl setup.”)

Install Sublime Text

https://www.sublimetext.com/3

Adding the Haxe Sublime Bundle

Install “Package Control” by copying the script located on https://packagecontrol.io/installation, then pasting it into the Sublime Text console (accessible using Ctrl + ` (backquote)

Access the “Package Control” menu that is now available in Sublime Text to “install” then type “haxe” to find the Haxe Sublime bundle on the list of available packages.

Adjust Sublime Text defaults

Go to Preferences > Settings > Default and copy anything you want to change. Open Preferences > Settings > User to paste it in, change the value and save the file.

I (for example) always set “trim_automatic_whitespace” to false, since that messes up source files.

After it is installed, there is a Package Control link in the Sublime Text menu (I forget which) and you type out to “install haxe”

Building a project

There is a way to make Sublime Text build the current project, but Sublime Text does not have projects, so the Haxe package tries to guess, based on the source file you are editing. I maintain a lot of haxelib libraries, so this method of guessing what project I want to compile is inadequate for my needs.

I open a terminal and use openfl test <target> when I want to build

1 Like

Cool! Thanks, I will let you know if I run into any hiccup!

Yeah my main concern was how exactly to set up the files and compile in the Terminal, though the preliminary parts definitely make for a great general guide.