I tried removing @:isVar, but then I get:
This field cannot be accessed because it is not a real variable Add @:isVar here to enable it
But you are right about where it crashes. I traced it further into CFFI.hx and found that it crashes on the following line:
result = __tryLoad ("./" + library, library, method, args);
It doesn’t get to the next trace.
haxelib run lime run “project.xml” windows -debug
Running process: D:\HaxeToolkit\haxe\haxelib.exe run lime run “project.xml” windows -debug
EDIT: I also traced inside the __tryLoad function.
Strangely, it doesn’t seem to get past
__loaderTrace ("Got result " + name); (traces after that don’t show up).
If I comment out that line it continues.
I finally got it to work by disabling the __loaderTrace function completely.
Looking at the __loaderTrace function, it seems that this line causes the problem:
var get_env = cpp.Lib.load ("std", "get_env", 1);
And “get_env” was also showing up when I first tried to debug in Visual Studio, see screenshot above. The call stack also shows tryLoad and loaderTrace.