EDIT: Fixed. If you are building on Windows the fix may be of interest.
using Windows 10 cmd.exe and building with Haxe from command line
Finally got a popup giving more info about the Error
— instruction referenced memory at a Hex address 0x…
“The memory could not be written.”
cl.exe was the running code.
which was 2017 MS Visual Studio (Community edition) Cpp compiler
another popup appeared that referenced ANSI32.dll (not 100% sure about the DLL name but it definitely contained a “32” and “ansi” as part of the name).
Anyway I was using a free software utility ansicon.exe that adds support for ANSI Escape characters that I used for builds of forGL that had text mode output.
So just running cmd.exe Without loading ansicon.exe before I did a 64 bit compile fixed the random build Error.
If you ever get similar random build errors you should check to see what you have loaded into cmd.exe and not load them as a possible fix.
Hope this helps !
Below is original symptoms (fixed now)
This is building from command line with
What I see is that I will build and a list of .cpp files scrolls down
and then get
with no other details.
So then I delete the entire build subdirectory and run again.
The name of the last file compiled before Error is NOT the same name as for previous Error.
This means to me that there is some Timing window going on where hxcpp builds are not stable.
Also I have another project that fails building using hxcpp with similar Random places of Error
but then 4 other haxe target languages build without that Error behavior.
My workaround for the multi target language build is to use HaxeDevelop on Windows to build for C++ which (I am guessing) has different Timing characteristics from command line build.
Help ! Thanks!