I'm trying to write a trivial program that calls an extern program. I have the following:

== foo.vala ==

extern int add(int a, int b);

void main() {
stdout.printf("%d\n", add(3, 4));
}

== lib.c ==

int add(int a, int b) {
return a + b;
}

=======

When I build, I get a warning:

$ valac foo.vala lib.c
foo.c:10: warning: ‘add’ used but never defined
$

The program runs fine. Am I doing something wrong? Or is the warning a Vala bug?

adam

_______________________________________________
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to