Compile error on Ubuntu 16.04: ‘numeric_limits’ is not a member of ‘std’
Opened this issue · 4 comments
Deleted user commented
Ubuntu 16.04, GCC (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609, ispc v1.9.2
g++ -O2 -msse2 -fPIC -I. -c ispc_texcomp/ispc_texcomp_astc.cpp -o ispc_texcomp/ispc_texcomp_astc.o
ispc_texcomp/ispc_texcomp_astc.cpp: In function ‘void CompressBlocksASTC(const rgba_surface*, uint8_t*, astc_enc_settings*)’:
ispc_texcomp/ispc_texcomp_astc.cpp:513:45: error: ‘numeric_limits’ is not a member of ‘std’
block_scores[yy * tex_width + xx] = std::numeric_limits<float>::infinity();
^
ispc_texcomp/ispc_texcomp_astc.cpp:513:65: error: expected primary-expression before ‘float’
block_scores[yy * tex_width + xx] = std::numeric_limits<float>::infinity();
^
Makefile.linux:49: recipe for target 'ispc_texcomp/ispc_texcomp_astc.o' failed
Deleted user commented
Would be really neat to have pre-compiled ISPCTextureCompressor binaries in cases like this...
Deleted user commented
Adding
#include <limits>
to ispc_texcomp/ispc_texcomp_astc.cpp
solves it.
Deleted user commented
Compiled libispc_texcomp.so
for Ubuntu 16.04: https://github.com/procedural/img2ktx_binaries_ubuntu_16_04/blob/master/third_party/ISPCTextureCompressor/build/libispc_texcomp.so
DaveBookout-Intel commented
thanks @procedural.