help-gplusplus
[Top][All Lists]
Advanced

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

Re: Loading multiple copies of libstdc++


From: hemant . ritu
Subject: Re: Loading multiple copies of libstdc++
Date: Mon, 21 Apr 2008 01:19:54 -0700 (PDT)
User-agent: G2/1.0

On Apr 21, 9:07 am, Paul Pluzhnikov <ppluzhnikov-...@gmail.com> wrote:
> hemant.r...@gmail.com writes:
> > We have a C application that dynamically loads twoo different C++
> > shared libraries. However, these two C++ shared libraries explicitly
> > load exactly same version of libstdc++ but from different locations.
> > Thus, the C application ends up loading multiple copies of the same
> > version of libstdc++. We would like to know if this can potentially
> > cause an issue due to run-time shared data for exceptions etc. Thanx.
>
> If the two versions of libstdc++ were compiled with the same
> version of g++, and were configured exactly the same way, and you
> are on one of the "sane" platforms (i.e. not on AIX or Win32), then
> you are lucky, and dynamic loader will simply never reference any
> symbols from the "second" libstdc++.
>
> Otherwise, all bets are off.
>
> You might want to inject some sanity, by simply removing libstdc++
> from the "second" location.
>
> Cheers,
> --
> In order to understand recursion you must first understand recursion.
> Remove /-nsp/ for email.


Thanks Paul. Please confirm how can the application check (e.g. look
for a libstdc++ versioning symbol) if the "first" libstdc++ has
already explicitly loaded and thereby skip explicit loading of the
"second" libstdc++. Thanx.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]