Boost logo

Boost Users :

Subject: Re: [Boost-users] ASIO - Using IO service from main program in a .so loaded with dlopen, dlsym, etc.
From: Bruce Simpson (bms_at_[hidden])
Date: 2009-08-29 08:53:39


J.W.F. Thirion wrote:
> Interesting thing is that I can actually pass a session object (from the
> socket server accept operation) from my main program to the .so function
> and have messages read and written on the socket. But when I try and
> create a new connection using the session's IO service (e.g. from a
> sock.get_io_service() call), then I never get the handle_connect.
>

Does your main program export dynamic symbols (--export-dynamic in GNU
ld) ? see here:
    http://www.nondot.org/~sabre/Mirrored/libtool-2.1a/libtool_9.html

If for whatever reason the dynamically loaded code needs to resolve a
symbol at runtime, and this has not been exported by your main program,
I would expect the code to either be terminated with a runtime linker
exception, or fail silently.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net