snowkit / snow

A low level cross platform framework for Haxe. Mac, Windows, Linux, Android, iOS, WebGL.
http://snowkit.org/snow
MIT License
133 stars 35 forks source link

Compile Error: AssetJSON #103

Closed darmie closed 6 years ago

darmie commented 6 years ago

I tried compiling my snow app, and I get this error:

Error: ./src/snow/systems/assets/AssetJSON.cpp: In member function 'void snow::systems::assets::AssetJSON_obj::__construct(snow::systems::assets::Assets, String, Dynamic)':
./src/snow/systems/assets/AssetJSON.cpp:42:21: error: 'class snow::systems::assets::AssetJSON_obj' has no member named 'set_json'
 HXLINE( 417)  this->set_json(_json);
darmie commented 6 years ago

Fixed it by removing -dce full from build flags

ruby0x1 commented 6 years ago

wonder if it should be reported as a bug to haxe, it seems unintended that a used function gets lost by dce? I know it can be annotated with @:keep but for that to happen on every used function is not the purpose

darmie commented 6 years ago

I was wondering if it's because it's a get/set function...

It's best to report it to Haxe, because it won't make sense to have to @:keep all functions.