gnu slist execute error: lost of file .../bits/allocator.h: No such file
<p>I'm using Ubuntu. g++ version 4.7.2.</p>

<p>Can anyone help me with the gnu-extension single list? I compiled the stuff here and got a core dump when executed.</p>

<p>I debuged it and saw the core dump happend in the first line, where it throwed an error that I cannot solve. May anyone please help me with that??</p>

<p>the error code:</p>

<pre><code>std::allocator&lt;char&gt;::allocator (this=0x7fffffffe4d0)
at /build/buildd/gcc-4.7-4.7.2/build/x86_64-linux-gnu/libstdc++-v3/include/bits/allocator.h:104
104 /build/buildd/gcc-4.7-4.7.2/build/x86_64-linux-gnu/libstdc++-v3/include/bits/allocator.h: No such file or directory.
</code></pre>

<p>This is my test code:</p>

<pre><code>#include &lt;ext/slist&gt;
#include &lt;cstring&gt;
#include &lt;iostream&gt;

int main(int argc, char * argv[])
{
    __gnu_cxx::slist&lt;char&gt; li(&amp;argv[1][0], &amp;(argv[1][strlen(argv[1])]));

    if(argc != 3)
        return 1;

    std::cout &lt;&lt; "SList: ";
    for(__gnu_cxx::slist&lt;char&gt;::iterator i = li.begin();
            i != li.end();
            ++i)
        std::cout &lt;&lt; *i;
    std::cout &lt;&lt; std::endl;

    li.remove(argv[2][0]);

    for(__gnu_cxx::slist&lt;char&gt;::iterator i = li.begin();
            i != li.end();
            ++i)
        std::cout &lt;&lt; *i;
    std::cout &lt;&lt; std::endl;

    return 0;
}//main
</code></pre>
