Building with GCC-6 Fails
Status: Beta
Brought to you by:
render_man
Buiding pixie-2.2.6 with GCC-6 fails with errors such as:
In file included from ../common/algebra.h:188:0,
from file_tiff.h:33,
from file_tiff.cpp:32:
../common/mathSpec.h: In function ‘void fresnel(const float*, const float*, float, float&, float&, float*, float*)’:
../common/mathSpec.h:548:37: error: ‘max’ was not declared in this scope
const SCALAR_TYPE g = SQRT(max(t,0));
^
../common/mathSpec.h:553:17: error: ‘min’ was not declared in this scope
Kr = min(Kr,1);
^
min and max are defined as real functions in GCC-6 and any code relying on their definition as macros may fail.
Actually, the other patch doesn't work if building with GCC-6 and including
-std=c++98inCXXFLAGS.