[Vala] [Bug] valac doesn't add #include <gio/gio.h> when the file doesn't include "main"




Continue from my last mail about my tries for writing DBus client(for MPRIS 2), I've got a new problem, which 
I fixed easily.
I have a main.vala, which contain the "main" function, and other file named PlayersList.vala .
The PlayersList.vala contain a class, named PlayersList, which one of its field is a Vala interface(client) 
which defines a DBus proxy.
I've added "--pkg gio-2.0" to compile script, but still it doesn't add "#include <gio/gio.h>" to 
PlayersList.c, only for main.c!
In result, when I put the PlayersList class in PlayersList.vala, it gives me this error:

PlayersList.vala.c:57:51: error: unknown type name ‘GDBusConnection’

And when I put this class in main.vala instead, it compiles fine, for the reason I mentioned above ^^
My valac version 0.12.1, in debian testing(16/7/11)

Tal
                                          


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