[Vala] warning calling extern function
- From: Adam Dingle <adam medovina org>
- To: vala-list gnome org
- Subject: [Vala] warning calling extern function
- Date: Tue, 09 Dec 2008 12:56:34 -0800
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]