C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Relocation error with STL Map in Shared Object

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Wed Jun 21, 2006 9:10 am    Post subject: Relocation error with STL Map in Shared Object Reply with quote



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






PostPosted: Wed Jun 21, 2006 9:10 am    Post subject: Re: Relocation error with STL Map in Shared Object Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.