How to generate GIR files from the Vala compiler?
- by celil
I am trying to create python bindings to a vala library using pygi with gobject introspection. However, I am having trouble generating the GIR files (that I am planning to compile to typelib files subsequently). According to the documentation valac should support generating GIR files.
Compiling the following
helloworld.vala
public struct Point {
public double x;
public double y;
}
public class Person {
public int age = 32;
public Person(int age) {
this.age = age;
}
}
public int main() {
var p = Point() { x=0.0, y=0.1 };
stdout.printf("%f %f\n", p.x, p.y);
var per = new Person(22);
stdout.printf("%d\n", per.age);
return 0;
}
with the command
valac helloworld.vala --gir=Hello-1.0.gir
doesn't create the Hello-1.0.gir file as one would expect. How can I generate the gir file?