Note that there are some explanatory texts on larger screens.

plurals
  1. POCompiling with Clang using Libc++ undefined references
    primarykey
    data
    text
    <p>The first couple are too long to reference. I get this error when I try to compile <code>clang++ -stdlib=libc++ ../main.cc ...</code> with clang and libc++ from the SVN.</p> <pre><code>error: undefined reference to 'typeinfo for char const*' error: undefined reference to '__cxa_allocate_exception' error: undefined reference to '__cxa_throw' /tmp/cc-pbn00y.o:../main.cc:function std::__1::deque&lt;double, std::__1::allocator&lt;double&gt; &gt;::__add_back_capacity(): error: undefined reference to '__cxa_begin_catch' /tmp/cc-pbn00y.o:../main.cc:function std::__1::deque&lt;double, std::__1::allocator&lt;double&gt; &gt;::__add_back_capacity(): error: undefined reference to '__cxa_rethrow' /tmp/cc-pbn00y.o:../main.cc:function std::__1::deque&lt;double, std::__1::allocator&lt;double&gt; &gt;::__add_back_capacity(): error: undefined reference to '__cxa_end_catch' /tmp/cc-pbn00y.o(.eh_frame+0xbd3): error: undefined reference to '__gxx_personality_v0' </code></pre> <p><strong>SOLUTION:</strong> Thanks to one of the answers, I know the solution. <strong>libc++</strong> can't be used by itself like libstdc++, it has to be linked along with <strong>libc++abi</strong>. However, libc++abi isn't complete yet, so using libc++ seems to be a little incomplete for the moment, but it is still my first choice when it completes.</p> <p><strong>UPDATE 5/26/2012:</strong> libc++abi is now complete for C++ and I have been using clang++ as follows successfully <code>clang++ -std=c++11 -stdlib=libc++ -lc++abi</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload