DBus-cxx requires support of at least C++17. As of version 2.0, it is also a full implementation of the DBus protocol, and does not depend on libdbus.
The requirements are intended to be very low. In order to build, you will need the following tools to be installed:
DBus-cxx depends on the following libraries:
(See section 4 for information on optional dependencies)
On Debian-based systems, you should be able to install with the following commands(as root/sudo):
Note that as of the writing of this guide(October 2020), libsigc++-3.0 has not yet been added to the Debian repositoreis, and you will need to build this dependency manually.
When checking out from GIT, the easiest way to build is as such:
In order to build the tools, you will need the following libraries, in addition to the above:
On Debian-based systems, you should be able to install popt with the following commands(as root/sudo):
apt-get install libpopt-dev
In order to configure the tools, set -DENABLE_TOOLS=ON when calling CMake
libcppgenerate can be found here: https://github.com/rm5248/libcppgenerate
libcppgenerate is bundled with dbus-cxx; to disable using the bundled version, pass -DTOOLS_BUNDLED_CPPGENERATE=off when configuring.
DBus-cxx requires at least C++17 to work properly. Because the library makes extensive use of smart pointers, it will use the standard C++ shared_ptr for the implementation.
To generate the documentation, you will need:
On Debian-based systems, you should be able to install with the following commands(as root/sudo):
apt-get install doxygen graphviz xsltproc
There are two tools provided with dbus-cxx:
dbus-cxx-xml2cpp - this generates code based off of a DBus introspection file. An adapter is created when you want to implement a service, while a proxy is created when you want to talk with a remote object
dbus-cxx-introspect - print out the introspection XML for a specified service
If you are on a Debian/Ubuntu based system, you can build the .deb packages for DBus-cxx:
Newer versions of Debian(12+) and Ubuntu(23.04+) contain libsigc++-3.0, so this dependency can be installed through apt.