$ pacman -S mingw-w64-x86_64-clang mingw-w64-x86_64-libc++ mingw-w64-x86_64-clang-tools-extra mingw-w64-x86_64-compiler-rt
touch test.cpp
#include <sstream>
#include <string>
#include <cstdlib>
int main()
{
std::istringstream iss("1.1");
double x;
iss >> x;
return EXIT_SUCCESS;
}
$ clang -stdlib=libstdc++ test.cpp
C:\DEV\msys64\tmptest-35009e.o:(.text+0x2b): undefined reference to std::allocator<char>::allocator()'
C:\DEV\msys64\tmp\test-35009e.o:(.text+0x3f): undefined reference tostd::__cxx11::basic_string
C:\DEV\msys64\tmptest-35009e.o:(.text+0x57): undefined reference to std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char> >::basic_istringstream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)'
C:\DEV\msys64\tmp\test-35009e.o:(.text+0x65): undefined reference tostd::__cxx11::basic_string
C:\DEV\msys64\tmptest-35009e.o:(.text+0x73): undefined reference to std::allocator<char>::~allocator()'
C:\DEV\msys64\tmp\test-35009e.o:(.text+0x80): undefined reference tostd::istream::operator>>(double&)'
C:\DEV\msys64\tmptest-35009e.o:(.text+0x9c): undefined reference to std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_istringstream()'
C:\DEV\msys64\tmp\test-35009e.o:(.text+0xcb): undefined reference tostd::__cxx11::basic_string
C:\DEV\msys64\tmptest-35009e.o:(.text+0xde): undefined reference to std::allocator<char>::~allocator()'
C:\DEV\msys64\tmp\test-35009e.o:(.text+0xf5): undefined reference tostd::__cxx11::basic_istringstream
C:\DEV\msys64\tmptest-35009e.o:(.xdata+0xc): undefined reference to __gxx_personality_seh0'
C:\DEV\msys64\tmp\test-35009e.o:(.text[__clang_call_terminate]+0x5): undefined reference to__cxa_begin_catch'
C:\DEV\msys64\tmptest-35009e.o:(.text[__clang_call_terminate]+0xf): undefined reference to `std::terminate()'
clang.exe: error: linker command failed with exit code 1 (use -v to see invocation)
One need to use clang++ ....
Most helpful comment
One need to use clang++ ....