How to generate GIR files from the Vala compiler?
        Posted  
        
            by celil
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by celil
        
        
        
        Published on 2010-06-13T00:06:58Z
        Indexed on 
            2010/06/13
            0:12 UTC
        
        
        Read the original article
        Hit count: 378
        
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?
© Stack Overflow or respective owner