Skip to main content

Thread: error using dbus API


hello ,
newbie dbus programming . tried executing following sample code on ubuntu-11.04:
code:
#include <dbus/dbus.h>  #include <stdio.h>      int main(){      dbuserror error;  dbusconnection *conn;    dbus_error_init (&error);  conn = dbus_bus_get (dbus_bus_system, &error);  if (!conn) {      fprintf (stderr, "%s: %s\n",               err.name, err.message);      return 1;  }  }

gives me following error
code:
dbusdemo.c:1:23: fatal error: dbus/dbus.h: no such file or directory  compilation terminated.
do need install development libraries or similar sort of thing?
relevant appreciated.

yes, need libdbus-1-dev. need use pkg-config provide correct include , library paths. how compiling code?

also, doing dbus? may want consider api, such glib's gdbus. (edit: high-level part of api in glib 2.30 in ubuntu 11.10, the rest in 2.26 in ubuntu 10.10)


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk error using dbus API


Ubuntu

Comments

Popular posts from this blog

Joomal 3.6.3 update error - PHP temporary folder is not set - Joomla! Forum - community, help and support

Upgrade 3.4.8 to 3.5.1 failed "download package failed" - Joomla! Forum - community, help and support

Fatal error during instalation - Joomla! Forum - community, help and support