Closed Dadoum closed 3 years ago
If you updated the compiler recently you may need to force dub to rebuild GtkD, this look like an error that heapons when updating the compiler. An undefined reference to a symbol in Phobos.
Also getPreferredWidth seems to have problems when overriden. It asks both two use (int minimum, int natural) and (out int, out int)
And I cleaned. But it could be a compiler issue since gdc and dmd works well.
I can't reproduce the getPreferredWidth issue locally with GtkD master and ldc2 1.25.1.
Can you give me your code snipet (I am not sure if I'm doing that correctly)
Can you give me a snipet that doesn't work, that is a lot easier troubleshooting.
class TextEditorMargin: Box {
import gobject.c.functions : g_object_newv;
import gtk.c.types;
import gtkd.Implement;
mixin ImplementClass!GtkBox;
this() {
super(Orientation.VERTICAL, 0);
addOnDraw(&onDraw);
}
public override void getPreferredWidth(out int minimumWidth, out int naturalWidth) {
int minimumWidthSuper, naturalWidthSuper;
super.getPreferredWidth(minimumWidthSuper, naturalWidthSuper);
minimumWidth = max(minimumWidthSuper, 12);
naturalWidth = max(naturalWidthSuper, 12);
}
public bool onDraw(Context cr, Widget sender) {
cr.paint();
return true;
}
}
This is a problem with gtkd.Implement, that currently only seems to handle out and ref for gtkD classes.
Can I do anything to fix this ?
Should be fixed now for this case, but not all types are handles properly yet.
Okay, but the function does not seems to be called... but not sure about that; and anyway I think you forgot to remove some debug output
translation: Undefined reference to= référence...non définie