Re: [Vala] Failed to include the header file
- From: Martin Leibner <mleibner tincorad com>
- To: Joshua Lee <muzili gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Failed to include the header file
- Date: Tue, 29 Mar 2011 03:38:48 -0300
Hi,
I think a quick hack could be to copy the file gio-2.0.vapi into ./
Maybe someone knows if it's possible to specify more tan one path to search
for .vapi files, when using "--vapidir=DIR"
Best regards,
Martín
2011/3/29 Joshua Lee <muzili gmail com>
Hi All,
Here's a little example:
- libtest.vala
[DBus (name="com.example.LibTest")]
public class LibTest: Object{
int i;
public void method_one()
{
stdout.printf("Hello, world\n");
}
}
- test.vala
public class Test{
public static void main(){
LibTest lib = new LibTest();
lib.method_one();
}
}
Compiling with following command.
valac -C -H libtest.h libtest.vala --library libtest --pkg gio-2.0
valac -C test.vala --vapidir=. --pkg libtest --pkg gio-2.0
gcc test.c libtest.c `pkg-config --libs --cflags gio-2.0` -I.
The last gcc compiling command output following error message:
In file included from test.c:7:0:
./libtest.h:35:47: error: expected declaration specifiers or ‘...’
before ‘GDBusConnection’
From the generated ccode, we found that the c code do not include
gio.h. How can I do to fix it?
BTW, I'm using the develement vala - Vala 0.11.7.
Thanks a lot.
Best regards,
Joshua
_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]