[cfe-dev] Compiling std::string with clang

Gabor Greif gabor at me.com
Thu Aug 9 15:22:06 PDT 2012


At work I also have a RHEL 5 based environment and have to live with g++ v4.1.2 headers. (Later I'll switch to libc++.)

Anyway I got around the compile error you descibe
> error: weakref declaration must have internal linkage
> extern __typeof(pthread_once) __gthrw_pthread_once __attribute__
> ((__weakref__("pthread_once")));
by defining away __weakref__ thus:

clang++ -D'__weakref__(X)=' ...

(writing this from memory, so I may err.)

Hope this helps,

    Gabor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120809/c46e9fdb/attachment.html>


More information about the cfe-dev mailing list