<p>I'm building a shared library with g++ 3.3.4. I cannot link to the library because I am getting </p>

<pre><code>./BcdFile.RHEL70.so: undefined symbol: _ZNSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE13insert_uniqueERKj
</code></pre>

<p>Which c++filt describes as </p>

<pre><code>std::_Rb_tree&lt;unsigned int, unsigned int, std::_Identity&lt;unsigned int&gt;, std::less&lt;unsigned int&gt;, std::allocator&lt;unsigned int&gt; &gt;::insert_unique(unsigned int const&amp;)
</code></pre>

<p>I thought this might have come from using hash_map, but I've taken that all out and switched to regular std::map. I am using g++ to do the linking, which is including <code>-lstdc++</code>.</p>

<p>Does anyone know what class would be instantiating this template? Or even better, which library I need to be linking to?</p>

<p><em>EDIT:</em> After further review, it appears adding the -frepo flag when compiling has caused this, unfortunately that flag is working around gcc3.3 bug.</p>

```
std::_Rb_Tree
```
might be a red-black tree, which would most likely be from using
```
map
```
. It should be part of
```
libstdc++
```
, unless your library is linking against a different version of
```
libstdc++
```
than the application, which from what you've said so far seems unlikely.
EDIT: Just to clarify, the red-black tree is the underlying data structure in
```
map
```
. All that
```
hash_map
```
does is hash the key before using it, rather than using the raw value.