<div dir="ltr">thank you for the answer, I was looking at the examples... it seems they are not compiled in a "standard" way. In fact the output is a bash script and in top of this script there's a comment:<br>
<br># The echo-server program cannot be directly executed until all the libtool<br># libraries that it depends on are installed.<br><br>maybe I'm missing some library? Tomorrow I will try again to resolve this issue<br>
<br>regards,<br>Claudio Contino<br><br><div class="gmail_quote">On Mon, Aug 18, 2008 at 6:09 PM, P. Durante <span dir="ltr"><<a href="mailto:shackan@gmail.com">shackan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Mon, Aug 18, 2008 at 2:45 PM, Claudio Contino <<a href="mailto:ckonte@gmail.com">ckonte@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I'm a computer science student and I need an IPC API written in C++ for a<br>
> project I'm working at. I thought DBUS was the best choice, but I have some<br>
> 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()<br>
> (/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()<br>
> (/usr/lib/libdbus-c++-1.so.0:??)<br>
> #4 0xb7f9b1d7 DBus::Connection::SessionBus()<br>
> (/usr/lib/libdbus-c++-1.so.0:??)<br>
> #5 0x804b2fb main()<br>
> (/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>
<br>
</div></div>wow that was weird, I just tried and got the same result<br>
<br>
from what I gather it's a linking problem, when you let autoconf and<br>
libtool do the linking (like in the library example programs) it does<br>
the Right Thing, if you just link against the library directly (both<br>
the dynamic and the static one) you get the above horror<br>
<br>
I'm going to slap myself in the face with Drepper's article[1] until I<br>
figure it out<br>
<br>
regards,<br>
Paolo<br>
<br>
[1] <a href="http://people.redhat.com/drepper/dsohowto.pdf" target="_blank">http://people.redhat.com/drepper/dsohowto.pdf</a><br>
</blockquote></div><br></div>