[Qt-interest] Building Qt with clang

Philipp Münzel mailing-lists at philippmuenzel.de
Tue Sep 6 20:51:02 CEST 2011


Good evening,

out of curiosity I'm trying to build Qt with clang, especially since I saw in the QtCreator changelog that QtCreator now integrates with clang. I look forward to seeing the better error messages of clang.

I checked out the master branch of Qt from gitorious, and configured with configure -platform unsupported/macx-clang

My llvm-clang is the Apple build, shipped with XCode 4.1 and gives the following version info: 
Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.1.0
Thread model: posix

When I start make however, the build fails soon with this error:

kernel/qdnd_mac.mm:628:5: error: use of undeclared identifier 'SetRect'
    SetRect(&boundsRect, boundsPoint.h, boundsPoint.v, boundsPoint.h + ...
    ^
1 error generated.

I tried with other branches of Qt, the 4.8 branch and also the specific git checkout mentioned in http://labs.qt.nokia.com/2010/10/29/compiling-qt-with-clang/ 

Is the Apple version of clang branched after or before the version in the blogpost?
Should I pull a recent clang from svn and build that? Or is at a completely different problem?

Regards,
Philipp



More information about the Qt-interest-old mailing list