#include <iostream>
#include <limits>
int main()
{
std::wcin.ignore(std::numeric_limits<std::streamsize>::max(), L'\n');
}
>clang++ -std=c++11 -o test.exe main.cpp
C:/DOCUME~1/LB/LOCALS~1/Temp/main-455071.o:fake:(.text+0x7e): undefined reference to `std::basic_istream<wchar_t, std::char_traits<wchar_t> >::ignore(int, int)'
collect2: ld returned 1 exit status
clang++: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)
It works if I use std::cin instead of std::wcin, but I'm using wide-character input and output for the most part and I've heard it is not good to mix them. Is there something I need to link to for this to work? Some searching on Google hasn't really helped. Note: all other uses of std::wcin work fine.