<div dir="ltr"><span style="font-size:14px">Hello all,</span><br style="font-size:14px"><br style="font-size:14px"><span style="font-size:14px">I am porting libcxx to Windows (not mingw). I am curious about the design of (w)cin/(w)cout/(w)cout. Currently we define (w)cin/(w)cout/(w)cout as char[] under src/iostream.cpp and initialise them as istream/ostream in function ios_base::Init::Init(). Why don't we defined them as istream/ostream object directly? The drawback of current design in my mind is that cause linking error under Windows. Windows mangler takes data type into account. Reference of std::cin would be translated into ?</span><font color="#0000ff" style="font-size:14px">cin@__1@std@@3V?$basic_istream@DU?$char_traits@D@__1@std@@@12@A</font><span style="font-size:14px"> (</span><font color="#ff0000" style="font-size:14px">class std::__1::basic_istream<char,struct std::__1::char_traits<char> > std::__1::cin</font><span style="font-size:14px">). Definition of std::cin, in contrast, would be translated into </span><font color="#0000ff" style="font-size:14px">?cin@__1@std@@3PADA</font><span style="font-size:14px"> (</span><font color="#ff0000" style="font-size:14px">char * std::__1::cin</font><span style="font-size:14px">). There is a linking error because two symbols are different.</span><br style="font-size:14px"><br style="font-size:14px"><span style="font-size:14px">Any suggestion or comment is appreciated,</span><br style="font-size:14px"><span style="font-size:14px">Yi-Hong</span><br></div>