Compile error using 1.1.13 version

I tried compiling my project to Linux native using cpp. I get the following error from make:

/usr/bin/ld: value.o: in function haxe::ui::components::_CheckBox::Value_obj::applyStyle(hx::ObjectPtr<haxe::ui::styles::Style_obj>)': Value.cpp:(.text+0x7ab): undefined reference to haxe::ui::components::Image_obj::set_resource(String)’
/usr/bin/ld: value.o:([_ZTVN4haxe2ui10components9_CheckBox9Value_objE]+0x198): undefined reference to `haxe::ui::core::ComponentValidation_obj::validateComponentInternal()’
collect2: error: ld returned 1 exit status
make: *** [makefile:8: New-Project] Error 1

I am using kha backend but I believe that the error is related to haxeui-core


Hmmm, can you try with git versions of haxeui-core and haxeui-kha, also, any chance you could zip up your project and attach?

I presume this is hxcpp? Do other hxcpp projects work? What version of hxcpp? Seems weird that ld cant seem to find certain symbols.


The same thing is happening with the git versions. This: haxe::ui::components::Image_obj::set_resource(String) looks like it may be from the Image.hx file? The project compiled fine to native in April under 1.0.8 (?). I hadn’t tried it since then and made no changes to it.

Or possibly the Checkbox object (even though I am not using it)

I deleted value.o and got:
…/Sources/src/haxe/ui/components/_CheckBox/Value.cpp:139:42: error: cannot convert ‘String’ to ‘haxe::ui::util::VariantType’ {aka ‘hx::ObjectPtrhaxe::ui::util::VariantType_obj’}
139 | HXLINE( 49) icon->set_resource(style->icon);
| ~~~~~^~
| |
| String
In file included from …/Sources/src/haxe/ui/components/_CheckBox/Value.cpp:14:
…/Sources/include/hxinc/haxe/ui/components/Image.h:70:78: note: initializing argument 1 of ‘haxe::ui::util::VariantType haxe::ui::components::Image_obj::set_resource(haxe::ui::util::VariantType)’
70 | ::haxe::ui::util::VariantType set_resource( ::haxe::ui::util::VariantType value);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^

same thing on a clean build — seems to not like icon->set_resource(style->icon)

Deleted all 3 Linux directories, rebuilt project and verified no old files were present. Working great now. Built with no errors.

1 Like