<div dir="ltr">Hello,<br><br>I'm a computer science student and I need an IPC API written in C++ for a project I'm working at. I thought DBUS was the best choice, but I have some problems with C++ bindings.<br>I have written this very very simple piece of code:<br>
<br>#include <dbus-c++-1/dbus-c++/dbus.h><br><br>DBus::BusDispatcher dispatcher;<br><br>int main()<br>{<br> DBus::default_dispatcher = &dispatcher;<br> DBus::Connection bus = DBus::Connection::SessionBus();<br>
return 0;<br>}<br><br>but I get a segmentation fault on DBus::Connection::SessionBus();<br>this is the backtrace stack:<br><br>#0 0xb7edbfb7 std::_List_node_base::hook() (/usr/lib/libstdc++.so.6:??)<br>#1 0xb7f9d340 DBus::Dispatcher::queue_connection() (/usr/lib/libdbus-c++-1.so.0:??)<br>
#2 0xb7f99089 DBus::Connection::setup() (/usr/lib/libdbus-c++-1.so.0:??)<br>#3 0xb7f9a943 DBus::Connection::Connection() (/usr/lib/libdbus-c++-1.so.0:??)<br>#4 0xb7f9b1d7 DBus::Connection::SessionBus() (/usr/lib/libdbus-c++-1.so.0:??)<br>
#5 0x804b2fb main() (/home/claudio/Documents/progetti/codeblocks/dbus_prova/main.cpp:8)<br><br>I'm using dbus-c++ compiled today from GIT and dbus daemon 1.2.3<br>should I move to another API or I am doing something incorrect?<br>
<br>thanks,<br>Claudio Contino<br></div>