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

Richard Smith richard at metafoo.co.uk
Tue Jun 17 23:32:05 PDT 2014


On Mon, Jun 16, 2014 at 8:01 AM, kaosad <frasker at hotmail.com> wrote:

> 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?
>

Try running it under a debugger and see where it fails, and try to figure
out why it's failing.


> 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.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140617/01bb4649/attachment.html>


More information about the cfe-dev mailing list