[cfe-dev] Help with compiling code with libcxx
    Ashok Nalkund 
    ashoknn at qualcomm.com
       
    Fri Jun 15 15:04:54 PDT 2012
    
    
  
Hi All,
   I compiled Qt with clang + libstdc++. Now using that, I'm trying to 
compile my code with clang + libc++. Now, one of the Qt headers is 
looking for std::bidirectional_iterator_tag by including <iterator>. 
This file does exist in libcxx/include and is picked up. However, 
<iterator> defines "bidirectional_iterator_tag" as:
> _LIBCPP_BEGIN_NAMESPACE_STD
>
> struct _LIBCPP_VISIBLE bidirectional_iterator_tag : public forward_iterator_tag {};
which is translated to:
> namespace std {inline namespace __1 {
> struct __attribute__ ((__visibility__("default"))) bidirectional_iterator_tag : public forward_iterator_tag {};
after pre-processing. So, the namespaces dont seem to match and clang 
compiles about incomplete type:
> include/QtCore/qtconcurrentiteratekernel.h:154:60: error: variable has incomplete type 'std::bidirectional_iterator_tag'
Any idea how to resolve this? I tried to compile Qt (4.8.2) with clang + 
libc++ but ran into problems with missing <ext/atomicity.h> in libc++.
TIA,
ashok
    
    
More information about the cfe-dev
mailing list