[LLVMdev] Compiling std::string with clang

Dmitry Pidan PIDAN1 at il.ibm.com
Thu Aug 9 07:44:43 PDT 2012


  Hi,
  I am new to LLVM, so I am sorry if the question I am going to ask has 
already been raised before. I will be thankful if anyone can describe me a 
quick way to search relevant topics within the list archive,
  When I am trying to compile a simple code, containing access to 
std::string, with clang:

    #include <string>
    int main() 
    {
          std::string s;
          return 0;
    }

   I am getting a plenty of following errors:

In file included from test_string.cpp:1:
In file included from 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/string:46:
In file included from 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/char_traits.h:46:
In file included from 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_algobase.h:69:
In file included from 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iosfwd:46:
In file included from 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/c++io.h:38:
In file included from 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr.h:132:
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:100:68: 
error: weakref declaration must have internal linkage
extern __typeof(pthread_once) __gthrw_pthread_once __attribute__ 
((__weakref__("pthread_once")));

   In one of the development phorums, I found somebody saying that LLVM 
does not support gcc 4.1 libraries. Is that true? If yes, which libraries 
should I use, in case I would like to use llvm 2.9?


  Regards,
  Dmitry


Dmitry Pidan
Emerging Quality Technologies Group
IBM Haifa Research Lab.
Lotus Notes: Dmitry Pidan/Haifa/IBM at IBMIL
E-mail: pidan1 at il.ibm.com
Phone: 972-4-8296036
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120809/f660e404/attachment.html>


More information about the llvm-dev mailing list