On Sun, Nov 16, 2008 at 8:17 PM, Alexander Bokovoy <ab altlinux org> wrote:
2008/11/16 Ildar Mulyukov <ildar users sourceforge net>:Hello, valac test-iface-prop-noset-impl.vala test-iface-prop-noset-iface.vala/tmp/.private/ildar/ccIVSzoO.o: In function `ns1_class1_set_property': test-iface-prop-noset-impl.c:(.text+0x482): undefined reference to `ns1_interface1_set_name' I discovered the problem (and created this simple test case). The root of it is that the unexistent accessor referenced from the implementor class. Maybe it's better not to do it?Which vala build is it? (I've just pushed r2023 with a lot of fixes to Sisyphus).
Discussed with Ildar. Apparently, main problem is that he has interface definition and a class that implements interface in separate vala source files. During generation phase valac puts ns1_interface1_set_name() into one .c file and marks it as static. Therefore it is not accessible from the second .c file where ns1_class1_set_property() is defined. In such cases _set_property() functions generated by gobject/valaobjectmodule.vala:add_set_property_function() need to have indirected calls via ns1_class_real_set_name(), not ns1_interface1_set_name() function. Experimental patch attached. -- / Alexander Bokovoy
Attachment:
vala-iface-property-setter.patch
Description: Text Data