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 <[email protected]>

> 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
> [email protected]
> http://mail.gnome.org/mailman/listinfo/vala-list
>
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to