Hello all, According to that Windows mangler takes data type into account. Reference of std::cin would be translated into ?cin@__1@std@@3V?$basic_istream@DU ?$char_traits@D@__1@std@@@12@A (class std::__1::basic_istream<char,struct std::__1::char_traits<char> > std::__1::cin). Definition of std::cin, in contrast, would be translated into ?cin@__1@std@@3PADA (char * std::__1::cin). There is a linking error because two symbols are different. In the other hand, Itanium mangler doesn't take data type into account. Either reference or definition of std::cin would be translated into __ZNSt3__13cinE. To make (w)cin/(w)cout/(w)cerr works under Windows, I rewrite part of the code under src/iostream.cpp and the patch is attached. I am wondering whether it would be a appropriate fix for the issue.
Any comment or suggestion is welcomed, Yi-Hong
cin_cout_cerr.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits