[Vala] Building problem



Hi all,

I am developing a brief application on Vala. I get the next error during
compilation:

/tmp/ccx6OU2o.o: In function `main_main':
Main.vala.c:(.text+0x196): undefined reference to `sub_parser_sub_copy'
Main.vala.c:(.text+0x1b9): undefined reference to `sub_parser_sub_free'
Main.vala.c:(.text+0x220): undefined reference to `sub_parser_sub_destroy'
collect2: ld returned 1 exit status
error: cc exited with status 256
Compilation failed: 1 error(s)

I have developed two dummy classes in order to simulate this error.


/* Foo */
using Gee;

class Foo : GLib.Object {
    struct Sub {
        public long initime;
        public int duration;
        public ArrayList<string> text;
    }

}

/* Bar */
using Foo;

class Bar : GLib.Object {
    public static int main (string[] args) {
        stdout.printf("hello!\n");
        Sub oSub = Sub();
        return 0;
    }

}

Then, the error I got is:

/tmp/cctCvhRE.o: In function `bar_main':
Bar.vala.c:(.text+0x9c): undefined reference to `foo_sub_destroy'
collect2: ld returned 1 exit status
error: cc exited with status 256
Compilation failed: 1 error(s)

However, if the ArrayList is removed, it works fine.

This is the line I used for building:
valac -o prueba Foo.vala Bar.vala --pkg  gee-1.0

Do you know what is the problem here?

Thanks,

-- 
Andrés Estévez Costas
Mi Blog: http://andresestevez.blogspot.com
Colaboro en Enxeñería sen Fronteiras Galicia: http://galicia.isf.es
Socio Fundador de: http://www.ghandalf.org


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