How can I get scons to use Clang with libc++? Putting "-stdlib=libc++" in any of the flags I pass to the Environment results in undefined reference errors like the following:
hello.o: In function `main':
hello.cpp:(.text+0xc): undefined reference to `std::__1::cout'
hello.o: In function `std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)':
The option to select libc++ needs to be both in the compiler and the linker flags:
env = Environment(CXX = 'clang++',
CXXFLAGS = '-std=c++11 -stdlib=libc++',
LINKFLAGS = '-stdlib=libc++')
env.Program('hello.cpp')