[cfe-dev] Help with compiling code with libcxx

Dmitri Gribenko gribozavr at gmail.com
Fri Jun 15 15:16:16 PDT 2012


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

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-dev mailing list