Re: [Vala] VAPI bindings for external lib



On 17/11/2014 14:28, Gonzalo Aguilar Delgado wrote:
Hello,

I'm modifiying babobab to support a ceph cluster. And want to do add
several tools to position files on OSDs, show fragemntation of
underlaying filesystems, etc. Maybe this will generate other tool, but
for now just modifying.

The problem is that I cannot access directly to librados, libcephfs
libraries from vala. Ehem, I can do it by just linking but figuring
out what's the best way to do it.

I suppose that creating a binding is the best. I saw some tutorials
but all require that library already uses GObject system that's not
the case.

So, should I create a wrapping object lib, and then generate bindings
from there?

Or should I do another way? I'm thinking about just adding dep and
call it from vala like c. But don't know what's the best way to proceed.

If those libs are C, just write the .vapi by hand. Use compact classes
and structs, unless they have reference-counted objects.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]