STL with shared library

Discussion in 'C++' started by S S, Jun 2, 2008.

  1. S S

    S S Guest

    Hi

    Are there some known issues using STL with shared library. Recently I
    got some crash for which the reason I dont see any, and searching on
    goolge shown some such issues with shared library.

    If somebody can help ? Thanks in advance.

    S
     
    S S, Jun 2, 2008
    #1
    1. Advertising

  2. S S

    S S Guest

    On Jun 2, 8:23 pm, Victor Bazarov <> wrote:
    > S S wrote:
    > > Are there some known issues using STL with shared library. Recently I
    > > got some crash for which the reason I dont see any, and searching on
    > > goolge shown some such issues with shared library.

    >
    > > If somebody can help ? Thanks in advance.

    >
    > Yes, there are, IIRC.  You need to look in the archives for the
    > discussions on the subject, I am certain you can find something of
    > interest.  I believe it mostly relates to the fact that some shared
    > objects (libraries) have their own heap and when objects that have their
    > own dynamic memory (like std::string or std::vector) are created inside
    > those libraries, the contents may not be readily accessible outside.  To
    > be entirely honest, I don't remember the exact problems, but I've run
    > into something like that a couple of times.
    >
    > The bottom line is however that the issue is not really with STL but
    > with dynamic linking and having a heap in the shared library.
    >
    > V
    > --
    > Please remove capital 'A's when replying by e-mail
    > I do not respond to top-posted replies, please don't ask


    Thanks for the pointers. But that means, we can never use shared
    library with STL ? After some searching I found that multiple memory
    managers can not be together in case of shared libs. But even if I use
    static library, we still have multiple memory managers ? So why static
    libs do not have problems?
     
    S S, Jun 2, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DJ Dev
    Replies:
    3
    Views:
    16,170
    Gandalf
    Feb 8, 2004
  2. Joe Fallon
    Replies:
    3
    Views:
    777
    =?Utf-8?B?Z3V5?=
    Jul 16, 2004
  3. ben
    Replies:
    3
    Views:
    524
    Kevin Spencer
    Nov 15, 2004
  4. Replies:
    1
    Views:
    1,297
    santosh
    Jul 15, 2008
  5. DJ Stunks
    Replies:
    0
    Views:
    337
    DJ Stunks
    Feb 10, 2007
Loading...

Share This Page