I feel like I'm doing something stupid, but can't see what it is. Apologies if it is stupid. When compiling a simple test program (which I'll attach in a minute) using g++, a whole slew of errors are the result: /opt/gnome2/include/dbus-1.0/dbus/dbus-glib-bindings.h: In function ‘void org_freedesktop_DBus_Introspectable_introspect_async_callback(DBusGProxy*, DBusGProxyCall*, void*)’: /opt/gnome2/include/dbus-1.0/dbus/dbus-glib-bindings.h:28: error: invalid conversion from ‘void*’ to ‘DBusGAsyncData*’ /opt/gnome2/include/dbus-1.0/dbus/dbus-glib-bindings.h: In function ‘void org_freedesktop_DBus_request_name_async_callback(DBusGProxy*, DBusGProxyCall*, void*)’: /opt/gnome2/include/dbus-1.0/dbus/dbus-glib-bindings.h:71: error: invalid conversion from ‘void*’ to ‘DBusGAsyncData*’ /opt/gnome2/include/dbus-1.0/dbus/dbus-glib-bindings.h: In function ‘void org_freedesktop_DBus_release_name_async_callback(DBusGProxy*, DBusGProxyCall*, void*)’ ... This continues for a 15 errors. The same program as a C program works as expected.
Created attachment 5024 [details] A simple program that demonstrates the problem Save file as silly.cpp compile with g++ -o silly silly.cpp `pkg-config --cflags --libs dbus-glib-1` Watch errors appear Rename silly.cpp to silly.c and recompile with: gcc-o silly silly.c `pkg-config --cflags --libs dbus-glib-1` watch it compile cleanly.
Created attachment 7380 [details] [review] fix This fixes dbus-binding-tool to generate C++ compatible bindings.
Fixed in git head.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.