Reply to alex,
> Sorry, I should added that bud deletes my definition file only when I
> run it with the -clean directive
> 
I think, rather than use a .def file, you should use the "export " keyword 
like this
export int fn(){...}
but then I have never created a DLL.