I am building a simple c++ program using clang++ and I am getting errors like below. I have added the gcc include paths manually as specified in the clang website. How do I resolve these?
In file included from a2.cpp:1:
In file included from /usr/include/c++/4.1.2/vector:65:
In file included from /usr/include/c++/4.1.2/bits/stl_algobase.h:69:
In file included from /usr/include/c++/4.1.2/iosfwd:45:
In file included from /usr/include/c++/4.1.2/i386-redhat-linux/bits/c++io.h:38:
In file included from /usr/include/c++/4.1.2/i386-redhat-linux/bits/gthr.h:132:
/usr/include/c++/4.1.2/i386-redhat-linux/bits/gthr-default.h:100:1: error: weakref declaration must have internal linkage
__gthrw(pthread_once)
^
/usr/include/c++/4.1.2/i386-redhat-linux/bits/gthr-default.h:81:23: note: expanded from:
#define __gthrw(name) __gthrw2(_gthrw ## name,name,name)
^
/usr/include/c++/4.1.2/i386-redhat-linux/bits/gthr-default.h:72:46: note: expanded from:
extern __typeof(type) name attribute ((weakref(#name2))); \