I’ve tried to compile a native binary and I keep running into this problem. I don’t know if it’s based on my UI framework, Haxe 4 or OpenFL but I would love input on how to solve this problem.
You can download the code here:
After you download the source extend the demo class.
package;
import openfl.display.Sprite;
class Main extends UIDemo
{
public function new()
{
super();
}
}
Here is the output from the error.
Error: In file included from /home/erick/haxelib/hxcpp/4,0,64/include/hxcpp.h:347:0:
/home/erick/haxelib/hxcpp/4,0,64/include/hx/Object.h: In instantiation of ‘hx::ObjectPtr::ObjectPtr(const SOURCE_*, bool) [with SOURCE_ = com::chaos::ui::Label_obj; OBJ_ = hx::Object]’:
/home/erick/haxelib/hxcpp/4,0,64/include/Dynamic.h:102:53: required from ‘Dynamic::Dynamic(const hx::ObjectPtr&) [with SOURCE_ = com::chaos::ui::Label_obj]’
./src/com/chaos/ui/ProgressSlider.cpp:280:27: required from here
/home/erick/haxelib/hxcpp/4,0,64/include/hx/Object.h:358:17: error: no matching function for call to ‘hx::ObjectPtr::CastPtr(com::chaos::ui::Label_obj*, bool&)’
CastPtr(const_cast(inPtr),inCheckCast);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/erick/haxelib/hxcpp/4,0,64/include/hx/Object.h:306:16: note: candidate: void hx::ObjectPtr::CastPtr(hx::Object*, bool) [with OBJ_ = hx::Object]
inline void CastPtr(hx::Object *inPtr,bool inThrowOnInvalid)
^~~~~~~
/home/erick/haxelib/hxcpp/4,0,64/include/hx/Object.h:306:16: note: no known conversion for argument 1 from ‘com::chaos::ui::Label_obj*’ to ‘hx::Object*’