 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Wed Jun 21, 2006 9:10 am Post subject: Relocation error with STL Map in Shared Object |
|
|
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? |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Jun 21, 2006 9:10 am Post subject: Re: Relocation error with STL Map in Shared Object |
|
|
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. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|