Seems to be solved by doing: type HandleStandardTransient* {.importcpp: "opencascade::handle<Standard_Transient>", header: "Standard_Transient.hxx", byref, pure,inheritable.} = object Run
instead of: type HandleStandardTransient* = Handle[StandardTransient] Run But I still wonder why this last one doesn't work.