Cling -stdlib=libc++ problems

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)

Hi,

We are aware if this issue and working on a solution.

cling must use the same standard library it was built with; this will be hard-wired. I.e. -stdlib will not be needed (and is actually not an option that is useful).

Cheers, Axel.

Hi,

cling built and thus run with libc++ should now (as of cling from one hour ago) work.

Cheers, Axel.