On Wednesday 06 November 2013 12:17:56 Christian Gagneraud wrote: > Hi, > > I'm using CLang build-analize tool, and when I switched from Qt 4.8 to > Qt 5.1 (insalled from Qt project's download area), I got a Qt #error, > basically the code is built with -fPIC, but CLang doesn't define a PIC > macro, so the build fails due to a check in qglobal.h (see details below). > > Is it possible to use CLang 3.2 with Qt 5.1 on Linux, or do I need to > use amore recent verion of CLang or maybe wait for Qt 5.2?
Simply add -fPIC or -fPIE. clang -fPIE -dM -E -x c /dev/null |grep -i 'PIC\|PIE\|ELF' #define __ELF__ 1 #define __PIC__ 2 #define __PIE__ 2 #define __pic__ 2 #define __pie__ 2 -- Olivier Woboq - Qt services and support - http://woboq.com - http://code.woboq.org _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development