dbus-c++ doesn't work?

Claudio Contino ckonte at gmail.com
Mon Aug 18 11:19:34 PDT 2008


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:

# The echo-server program cannot be directly executed until all the libtool
# libraries that it depends on are installed.

maybe I'm missing some library? Tomorrow I will try again to resolve this
issue

regards,
Claudio Contino

On Mon, Aug 18, 2008 at 6:09 PM, P. Durante <shackan at gmail.com> wrote:

> On Mon, Aug 18, 2008 at 2:45 PM, Claudio Contino <ckonte at gmail.com> wrote:
> > Hello,
> >
> > 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.
> > I have written this very very simple piece of code:
> >
> > #include <dbus-c++-1/dbus-c++/dbus.h>
> >
> > DBus::BusDispatcher dispatcher;
> >
> > int main()
> > {
> >     DBus::default_dispatcher = &dispatcher;
> >     DBus::Connection bus = DBus::Connection::SessionBus();
> >     return 0;
> > }
> >
> > but I get a segmentation fault on DBus::Connection::SessionBus();
> > this is the backtrace stack:
> >
> > #0 0xb7edbfb7    std::_List_node_base::hook()
> (/usr/lib/libstdc++.so.6:??)
> > #1 0xb7f9d340    DBus::Dispatcher::queue_connection()
> > (/usr/lib/libdbus-c++-1.so.0:??)
> > #2 0xb7f99089    DBus::Connection::setup()
> (/usr/lib/libdbus-c++-1.so.0:??)
> > #3 0xb7f9a943    DBus::Connection::Connection()
> > (/usr/lib/libdbus-c++-1.so.0:??)
> > #4 0xb7f9b1d7    DBus::Connection::SessionBus()
> > (/usr/lib/libdbus-c++-1.so.0:??)
> > #5 0x804b2fb    main()
> > (/home/claudio/Documents/progetti/codeblocks/dbus_prova/main.cpp:8)
> >
> > I'm using dbus-c++ compiled today from GIT and dbus daemon 1.2.3
> > should I move to another API or I am doing something incorrect?
> >
>
> wow that was weird, I just tried and got the same result
>
> from what I gather it's a linking problem, when you let autoconf and
> libtool do the linking (like in the library example programs) it does
> the Right Thing, if you just link against the library directly (both
> the dynamic and the static one) you get the above horror
>
> I'm going to slap myself in the face with Drepper's article[1] until I
> figure it out
>
> regards,
> Paolo
>
> [1] http://people.redhat.com/drepper/dsohowto.pdf
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20080818/6aa437df/attachment.htm 


More information about the dbus mailing list