Hi!

On Fri, May 25, 2001 at 10:15:02PM +0200, Norman Kr�mer wrote:
> i've come across some weird effect about using libmcop in a shared module and 
> loading that module from an executable thats not linked with libstdc++.
> I have append a mini sample that loads a .so which has only one function 
> exported where it creates a Dispatcher object.
> If i don't link libstdc++ with the main executable the program hangs 
> somewhere in the creation of Dispatcher (usually in flockfile() when it tries 
> to read from a file like the various .mcopfiles).
> Any idea about that, can you verify that behaviour ?

The problem is that if a piece of code uses threads (and some aRts modules,
i.e. the mpeglib decoders, do), then the executable containing main() has
to be linked against libpthread. Libmcop is linked against libpthread to
force dependant apps to link against it, too, but of course "forcing" does
only work if you link against it explicitely.

If you dlopen() libmcop, you will have to link the application that does
dlopen libmcop against libpthread, otherwise it won't work.

I am not sure if that will change in the future (the libmcop vs. libmcop-mt
split would make that possible), but at least that is the current state.

   Cu... Stefan
-- 
  -* Stefan Westerfeld, [EMAIL PROTECTED] (PGP!), Hamburg/Germany
     KDE Developer, project infos at http://space.twc.de/~stefan/kde *-         

Reply via email to