unreal.hx icon indicating copy to clipboard operation
unreal.hx copied to clipboard

[4.19] Cppia bad link

Open gilmarsquinelato opened this issue 6 years ago • 6 comments

In my tests I'm getting this error when I use haxe.Json package.

var obj = { content: "asd" };
haxe.Json.stringify(obj);

If "haxe.Json.stringify(obj);" is commented, the change works fine.

gilmarsquinelato avatar Apr 26 '18 20:04 gilmarsquinelato

Have you tried latest? The commit https://github.com/proletariatgames/unreal.hx/commit/1818dedf39cd4703b7a4b34f8fa27256a7e8408d should have taken care of that

waneck avatar Apr 26 '18 20:04 waneck

Yes, tested now with development branch.

gilmarsquinelato avatar Apr 26 '18 20:04 gilmarsquinelato

Uhm I think I have an idea of what might be causing this. In the meantime, you can work around it by either:

  • Creating an Imports.hx file in your Static directory, which cointains import haxe.Json; in it
  • Deleting your Intermediate/Haxe directory and building it again

Can you let me know if either of these fix it? I think what happened is that when cppia is building, it thinks that haxe.Json can exist only in cppia code and does not check if it was previously built in C++ - thus not requesting a hxcpp compilation

waneck avatar Apr 26 '18 20:04 waneck

Oh man, you are the guy! It's working!

Thanks!

gilmarsquinelato avatar Apr 26 '18 21:04 gilmarsquinelato

😃 I'm going to reopen this because I think we should detect if a cpp.* / haxe.* is being used in cppia but not compiled in hxcpp

waneck avatar Apr 26 '18 21:04 waneck

It's ok! 😄

gilmarsquinelato avatar Apr 26 '18 21:04 gilmarsquinelato