Your main()
function must do some extra initialization before using the Hildon::Notification
class. You must call Hildon::notify_init()
and it is currently also necessary to initialize D-Bus
, as follows:
Hildon::notify_init("Notification example"); DBusConnection* conn = dbus_bus_get (DBUS_BUS_SESSION, NULL); dbus_connection_setup_with_g_main (conn, NULL);