[cfe-dev] Fail when accessing std::xxx under clang++

kaosad frasker at hotmail.com
Mon Jun 16 08:01:29 PDT 2014


I previously posted this same question here:
http://stackoverflow.com/questions/24242329/fail-when-accessing-stdxxx-under-clang
<http://stackoverflow.com/questions/24242329/fail-when-accessing-stdxxx-under-clang>  

But no one answered so I am re-posting it here. Hopefully no one is
offended.	

I am using clang 3.4.1 running under windows and mingw32 (gcc 4.8.1).

I have no problem with compiling C program under clang and running it. I
also have no problem compiling C++ program through clang++. But I have
problem running the resulting C++ program. It failed with an error stating
that the program has halted. I am pretty sure that it has got something to
do with the std:: as it failed whenever I invoked any functions in the std.

Here is my simple C++ program:

  #include <iostream>
  int main() {
    std::cout << "hello, world!" << std::endl;
    return 0;
  }

I compiled with this command:

  clang++ Hello.cc -o Hello.exe

Any advice?

edit: I discovered that if I *std::cout << "hello, world!\n"*, it terminated
gracefully. But *std::cout << "count: " << count* produced the same error.




--
View this message in context: http://clang-developers.42468.n3.nabble.com/Fail-when-accessing-std-xxx-under-clang-tp4040043.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list