Clang with libc++ doesn't find quuick_exit()
文鳥
bunchou at googlemail.com
Fri Aug 10 07:09:28 UTC 2012
On Fri, 10 Aug 2012 02:21:28 +0400
Артем Зуйков <chertus at gmail.com> wrote:
> Hi,
>
> I can't build anything with clang & libc++
> What am I doing wrong?
>
>
> > clang++ -stdlib=libc++ test1.cpp -o x
> In file included from test1.cpp:1:
> /usr/include/c++/v1/cstdlib:134:9: error: no member named
> 'at_quick_exit' in the global namespace
> using ::at_quick_exit;
> ~~^
> /usr/include/c++/v1/cstdlib:135:9: error: no member named
> 'quick_exit' in the global namespace
> using ::quick_exit;
> ~~^
> 2 errors generated.
>
>
>
> A part of /usr/include/stdlib.h
>
> #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
> _Noreturn void
> quick_exit(int);
> int at_quick_exit(void (*)(void));
> #endif /* __ISO_C_VISIBLE >= 2011 */
>
Hi,
quick_exit() has only become available in C++ as part of the C++11
standard. Thus you will have to invoke clang++ as follows:
clang++ -std=c++11 -stdlib=libc++ test1.cpp -o x
or '-std=c++0x' if you're using an older version of clang++
Best regards
More information about the freebsd-questions
mailing list