[cfe-dev] Help with compiling code with libcxx
Ashok Nalkund
ashoknn at qualcomm.com
Fri Jun 15 16:22:14 PDT 2012
Any info on compiling Qt (4.8.2) with clang & libc++ ? I couldnt find
replacements for things like "__gnu_cxx::__exchange_and_add()" being
used in Qt.
TIA
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>
>
> 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).
>
> [1] https://bugreports.qt-project.org/browse/QTBUG-25960
>
> Dmitri
>
More information about the cfe-dev
mailing list