[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dlsym() and C++

Quoting Pierre Phaneuf (pp@ludusdesign.com):

> > Unfortantly, there is a fatal bug in glibc's dynamic linker: dlsym() simply
> > doesn't work with C++ libraries. :-(
> > 
> > Because of that, ClanLib's startup sequency is not like it is intented to
> > be...
> I think I could help you with that one. What are you trying to do
> exactly? I have seen more than one experienced coder fall prey to some
> dl intricacy, you wouldn't be the first one!

I've attached a tgz file with four files demonstrating the problem:

     If I use dlopen() and dlsym() to get a pointer to a global function in
     a C++ library, the thing dumps core when I call it.

     If I use excatly the same procedure when it's a C library, everything
     is fine, and a small message is printed to the screen.

I would be _very_ happy, if you can find some reason why this doesn't work.

Magnus Norddahl