[cfe-dev] Help with compiling code with libcxx

Ashok Nalkund ashoknn at qualcomm.com
Fri Jun 15 15:32:59 PDT 2012


On 6/15/2012 3:16 PM, Dmitri Gribenko wrote:
> Hi Ashok,
>
> On Fri, Jun 15, 2012 at 3:04 PM, Ashok Nalkund<ashoknn at qualcomm.com>  wrote:
>> 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++.
>
> Qt should not be doing that, I've reported a bug a while ago [1].
> Feel free to vote for it.
>
> The workaround is simple: just replace that forward declaration (in
> qiterator.h, AFAIK) with #include<iterator>

Thanks for the quick response and the solution.

>
> Please note that if you compile Qt with libstdc++ and compile your
> code with libc++, you will not be able to pass STL containers and
> other objects from Qt to your code -- they are not layout-compatible.
> (For example, QVector::toStdVector() will return libstdc++
> std::vector, which is not compatible with libc++ std::vector).

I was thinking if this will work correctly and thought I'd give it a 
shot. So now I have to first compile Qt with libc++ and then my code 
with libc++. Thanks for the pointers, I've voted for the bug as well.

>
> [1] https://bugreports.qt-project.org/browse/QTBUG-25960
>
> Dmitri
>



More information about the cfe-dev mailing list