Unable to build lime/openfl etc on Mac

I recently moved from windows to mac os and I’m trying to get my haxe projects up and running again.

I’m using Intellij with the haxe plugin and can build with no issues to flash and html5. However, when I target mac os, I get a ton of errors. I assume this a first time error as openfl and lime needs to be built, but I cannot guess what the problem is.

I have 500 of this kind of errors:

Error: (- Compiling src/lime/graphics/utils/ImageDataUtil.cpp) xcrun --sdk macosx10.9 clang++ -Iinclude -c -fvisibility=hidden -stdlib=libstdc++ -O2 -I/usr/lib/haxe/lib/hxcpp/3,2,102/include -DHX_MACOS -m64 -Wno-parentheses -Wno-null-dereference -Wno-unused-value -Wno-format-extra-args -Wno-bool-conversion -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=321 -x c++ -frtti -Wno-invalid-offsetof ./src/lime/graphics/utils/ImageDataUtil.cpp -oobj/darwin64/e82e0eeb_ImageDataUtil.o

It really doesn’t say what the problem is, only that it an error occurred. Everything is latest stable version. Any ideas on how to remedy this?

Do you have a current version of Xcode installed?

Yes I do. Fresh from the app store.

Any other tools I might need to have installed?

What happens if you run xcrun --sdk macosx10.9 clang++ from the command-line? Does it work?

Looks like it, I get the following return:

clang: error: no input files

Not sure what I did, but now I only get a single error:

Error: (- Compiling src/ApplicationMain.cpp) xcrun --sdk macosx10.9 clang++ -Iinclude -c -fvisibility=hidden -stdlib=libstdc++ -O2 -I/usr/lib/haxe/lib/hxcpp/3,2,102/include -DHX_MACOS -m64 -Wno-parentheses -Wno-null-dereference -Wno-unused-value -Wno-format-extra-args -Wno-bool-conversion -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=321 -x c++ -frtti -Wno-invalid-offsetof ./src/ApplicationMain.cpp -oobj/darwin64/57588eaa_ApplicationMain.o

I tried to retrace my steps to really see what was going on so I deleted the bin/mac64 folder and started over.

First time I tried to build the project I got my 500 errors. However the application is still built and I can run it. (!?!?)

On subsequent build attempts, I only get errors for ApplicationMain and any files that I changed, but the application keeps being built as if nothing happened.

Any idea what is going on here?

Do you use HXCPP from haxelib, or is it a development (GIT) version? Also, does it report “Error” when you build from IntelliJ, or if you use lime test mac from a terminal?

I use HXCPP from haxelib. Errors are from IntelliJ.

I tried building from scratch from terminal and it worked without any issues!

Regular syntax errors are reported as usual, so I guess I can live with this as it seems to be an issue with reporting the output from the build process rather than actual build errors.

Thanks for taking the time to help out!

Sure, this sounds like a bother, hopefully it can be resolved (or is resolved in a newer plugin version?)