help-gplusplus
[Top][All Lists]
Advanced

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

Relocation error with STL Map in a shared object


From: Suneeel
Subject: Relocation error with STL Map in a shared object
Date: 20 Jun 2006 22:22:10 -0700
User-agent: G2/0.2

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[i] = 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?



reply via email to

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