what should be included for dbus_connection_setup_with_g_main()?

arrow arrowf at 163.com
Fri Jan 2 20:54:15 PST 2009




Colin Walters wrote:
> 
> On Fri, Jan 2, 2009 at 11:09 PM, arrow <arrowf at 163.com> wrote:
>>
>> Hi,
>>
>> I meet a build error says: 'dbus_connection_setup_with_g_main' was not
>> declared in this scope.
>>
>> I have included the following headfiles, and used the gcc option:
>> `pkg-config --cflags --libs dbus-glib-1`
>>
>> #include <glib.h>
>> #include <dbus/dbus.h>
>> #include <dbus/dbus-glib.h>
> 
> You need #include <dbus/dbus-glib-lowlevel.h>
> 
> You shouldn't normally need to call it, if you're using dbus_g_bus_get
> as is typically the case.
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
> 
> 


It works! Thanks a lot for your response so quickly!!!

I'm notice dbus_g_bus_get is used to replace
dbus_connection_setup_with_g_main. But I have a concern about it. My code is
using both dbus-glib-binding API and some low level dbus APIs. One of the
question is the difference of DBusGConnection and DBusConnection. I don't
know if they could be converted to each other freely or not. If not, I can't
use the same connection handler both in dbus-glib-binding API and those low
level dbus APIs.. Do you have any idea? 

-- 
View this message in context: http://www.nabble.com/what-should-be-included-for-dbus_connection_setup_with_g_main%28%29--tp21261877p21262117.html
Sent from the Free Desktop - dbus mailing list archive at Nabble.com.



More information about the dbus mailing list