Dynamic libraries
Carlos Cassino
cassino@tecgraf.puc-rio.br
Thu Aug 13 04:58:00 GMT 1998
> > I'm using RedHat5.0, glibc & binutils updated and EGCS-1.0.3.
> > I wrote a tiny C++ program that simply loads a (C++) dynamic library,
> > calls a function and unloads it. The problem is that if an exception
> > is thrown inside the library (and caught there) the program aborts.
>
> I believe this problem exists on just about every platform.
>
> --
> Chad Gatesman Home: 203.730.1389
> Software Engineer Work: 203.798.1007 x144
> Bristol Technology http://www.bristol.com/
Do you know why it happens? I really can't understand that...
For example: if you make a C program that loads libstdc++.so and a
C++ library, the same think happens with one difference: at end of
the execution, if you try to unload libstdc++ (just like I do with
my library) you got a SegFault. Does it make sense?
Regards,
-- Cassino
More information about the Gcc
mailing list