Relocation error with STL Map in Shared Object

Discussion in 'C++' started by Suneeel@gmail.com, Jun 21, 2006.

  1. Guest

    Hi All,

    I'm having a problem with STL on Red Hat Linux 9, gcc 4.1.0.

    I have a Shared Object that is inserting an object into a MAP. When
    this shared object is used, I get a runtime error saying

    relocation error: /usr/lib/libMySharedObj.so: undefined symbol:
    _ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_


    The code in the shared object is as follows:

    map<unsigned int, MyClass*> myMap;
    MyClass *pObj;
    myMap = pObj; //when I remove this line, the error disappears.

    Is there a problem with the way I am inserting the object into the map,
    or am I not linking the library properly?
     
    , Jun 21, 2006
    #1
    1. Advertisements

  2. Guest

    Hi again,

    Silly mistake, I was also using another shared object that was using an
    earlier version of the stdc++ library.

    Recompiled bothShared Object with the same version and the problem was
    solved.
     
    , Jun 21, 2006
    #2
    1. Advertisements

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. Douglass Turner
    Replies:
    2
    Views:
    2,328
    Manfred Bartz
    Sep 4, 2003
  2. Marcus
    Replies:
    2
    Views:
    783
    Marcus
    Dec 9, 2005
  3. Replies:
    2
    Views:
    710
    klaus hoffmann
    Feb 22, 2006
  4. grbVRCPP
    Replies:
    0
    Views:
    985
    grbVRCPP
    Mar 13, 2007
  5. kl
    Replies:
    7
    Views:
    1,685
    James Kanze
    Jan 1, 2008
  6. tkevans
    Replies:
    0
    Views:
    3,039
    tkevans
    Feb 11, 2009
  7. swtsvn

    stl map error error C2440

    swtsvn, Oct 5, 2009, in forum: C++
    Replies:
    3
    Views:
    1,239
    Bo Persson
    Oct 5, 2009
  8. Luca Risolia

    STL map to STL vector

    Luca Risolia, Jan 13, 2014, in forum: C++
    Replies:
    32
    Views:
    824
    Seungbeom Kim
    Jan 18, 2014
Loading...