I’m on linux platform, using libc++ is painful.
First, I have to compile llvm/clang with libc++ to get rid of errors like this ExecutionContext: use of undefined symbol '_ZN5cling20valuePrinterInternal13flushToStreamERN4llvm11raw_ostreamERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE'
, because that symbol in LLVM requires libstdc++ instead of libc++.
After compile LLVM/Clang and cling against libc++, cling -stdlib=libc++
works, std::cout<<"1"
works fine but std::cout<<1
gives ExecutionContext: use of undefined symbol '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcl'
, but this symbol seems inside libc++ itself.
I don’t know wether this is a bug or I compile something wrong.
(I use libc++ because I want to test c++14, and it works)