laumaya / GLC_lib

GLC_lib is a C++ library for high performance 3D application based on OpenGL and Qt4 GUI
http://www.glc-lib.net
Other
62 stars 31 forks source link

non-constant-expression cannot be narrowed from type 'qreal' (aka 'double') to 'GLfloat' (aka 'float') in initializer list #30

Open ryandesign opened 6 years ago

ryandesign commented 6 years ago

I'm trying to build GLC_lib 3.0.1 with Qt 5.10.0 on macOS 10.12.6 with Xcode 9.2 and it fails as follows:

shading/glc_material.cpp:468:29: error: non-constant-expression cannot be narrowed from type 'qreal' (aka 'double') to 'GLfloat' (aka 'float') in initializer list [-Wc++11-narrowing]

(and many other occurrences of the same error in that file) before finishing with:

fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [Build/glc_material.o] Error 1