[Development] Error building Qt 5 with clang in 32-bit

Stephen Chu stephen at ju-ju.com
Wed Aug 15 17:20:16 CEST 2012


I tried to build Qt 5 (from git) with MacPorts clang 4.7 using 
macx-clang-libc++-32 mkspec. It failed with narrowing errors like this:

styles/qmacstyle_mac.mm:3828:45: error: non-constant-expression cannot 
be narrowed from type 'qreal'
       (aka 'double') to 'CGFloat' (aka 'float') in initializer list 
[-Wc++11-narrowing]
                     CGFloat colorComp[] = { textColor.redF(), 
textColor.greenF(),
                                             ^~~~~~~~~~~~~~~~

Building in 64-bit works since CGFloat is defined as double in x64, but 
it's float in 32-bit.

Anyway I can work around this?



More information about the Development mailing list