<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jun 16, 2014 at 8:01 AM, kaosad <span dir="ltr"><<a href="mailto:frasker@hotmail.com" target="_blank">frasker@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I previously posted this same question here:<br>
<a href="http://stackoverflow.com/questions/24242329/fail-when-accessing-stdxxx-under-clang" target="_blank">http://stackoverflow.com/questions/24242329/fail-when-accessing-stdxxx-under-clang</a><br>
<<a href="http://stackoverflow.com/questions/24242329/fail-when-accessing-stdxxx-under-clang" target="_blank">http://stackoverflow.com/questions/24242329/fail-when-accessing-stdxxx-under-clang</a>><br>
<br>
But no one answered so I am re-posting it here. Hopefully no one is<br>
offended.<br>
<br>
I am using clang 3.4.1 running under windows and mingw32 (gcc 4.8.1).<br>
<br>
I have no problem with compiling C program under clang and running it. I<br>
also have no problem compiling C++ program through clang++. But I have<br>
problem running the resulting C++ program. It failed with an error stating<br>
that the program has halted. I am pretty sure that it has got something to<br>
do with the std:: as it failed whenever I invoked any functions in the std.<br>
<br>
Here is my simple C++ program:<br>
<br>
  #include <iostream><br>
  int main() {<br>
    std::cout << "hello, world!" << std::endl;<br>
    return 0;<br>
  }<br>
<br>
I compiled with this command:<br>
<br>
  clang++ Hello.cc -o Hello.exe<br>
<br>
Any advice?<br></blockquote><div><br></div><div>Try running it under a debugger and see where it fails, and try to figure out why it's failing.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

edit: I discovered that if I *std::cout << "hello, world!\n"*, it terminated<br>
gracefully. But *std::cout << "count: " << count* produced the same error.<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/Fail-when-accessing-std-xxx-under-clang-tp4040043.html" target="_blank">http://clang-developers.42468.n3.nabble.com/Fail-when-accessing-std-xxx-under-clang-tp4040043.html</a><br>

Sent from the Clang Developers mailing list archive at Nabble.com.<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div></div>