Greetings,
I’m trying to compile my old projects again… the version of Panda3D is the same, but perhaps the compiler has been updated. I’m using gcc 5.2.0.
There seem to be some issue with uses of constexpr, check this out:
In file included from /usr/include/panda3d/convert_srgb.h:57:0,
from /usr/include/panda3d/pnmImage.h:23,
from /usr/include/panda3d/texture.h:43,
from /usr/include/panda3d/shaderInput.h:33,
from /usr/include/panda3d/nodePath.h:41,
from /usr/include/panda3d/windowFramework.h:19,
from /usr/include/panda3d/pandaFramework.h:21,
from /home/plaristote/Work/fallout-equestria/code/game/include/level/level.hpp:5,
from /home/plaristote/Work/fallout-equestria/code/game/include/gametask.hpp:5,
from /home/plaristote/Work/fallout-equestria/code/game/src/script_api.cpp:4:
/usr/include/panda3d/convert_srgb.I: In function 'constexpr float decode_sRGB_float(unsigned char)':
/usr/include/panda3d/convert_srgb.I:23:1: error: the value of 'to_linear_float_table' is not usable in a constant expression
}
^
In file included from /usr/include/panda3d/pnmImage.h:23:0,
from /usr/include/panda3d/texture.h:43,
from /usr/include/panda3d/shaderInput.h:33,
from /usr/include/panda3d/nodePath.h:41,
from /usr/include/panda3d/windowFramework.h:19,
from /usr/include/panda3d/pandaFramework.h:21,
from /home/plaristote/Work/fallout-equestria/code/game/include/level/level.hpp:5,
from /home/plaristote/Work/fallout-equestria/code/game/include/gametask.hpp:5,
from /home/plaristote/Work/fallout-equestria/code/game/src/script_api.cpp:4:
/usr/include/panda3d/convert_srgb.h:27:54: note: 'to_linear_float_table' was not declared 'constexpr'
extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const float to_linear_float_table[256];
^
In file included from /usr/include/panda3d/convert_srgb.h:57:0,
from /usr/include/panda3d/pnmImage.h:23,
from /usr/include/panda3d/texture.h:43,
from /usr/include/panda3d/shaderInput.h:33,
from /usr/include/panda3d/nodePath.h:41,
from /usr/include/panda3d/windowFramework.h:19,
from /usr/include/panda3d/pandaFramework.h:21,
from /home/plaristote/Work/fallout-equestria/code/game/include/level/level.hpp:5,
from /home/plaristote/Work/fallout-equestria/code/game/include/gametask.hpp:5,
from /home/plaristote/Work/fallout-equestria/code/game/src/script_api.cpp:4:
/usr/include/panda3d/convert_srgb.I: In function 'constexpr unsigned char decode_sRGB_uchar(unsigned char)':
/usr/include/panda3d/convert_srgb.I:45:1: error: the value of 'to_linear_uchar_table' is not usable in a constant expression
}
^
In file included from /usr/include/panda3d/pnmImage.h:23:0,
from /usr/include/panda3d/texture.h:43,
from /usr/include/panda3d/shaderInput.h:33,
from /usr/include/panda3d/nodePath.h:41,
from /usr/include/panda3d/windowFramework.h:19,
from /usr/include/panda3d/pandaFramework.h:21,
from /home/plaristote/Work/fallout-equestria/code/game/include/level/level.hpp:5,
from /home/plaristote/Work/fallout-equestria/code/game/include/gametask.hpp:5,
from /home/plaristote/Work/fallout-equestria/code/game/src/script_api.cpp:4:
/usr/include/panda3d/convert_srgb.h:26:62: note: 'to_linear_uchar_table' was not declared 'constexpr'
extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const unsigned char to_linear_uchar_table[256];
^
In file included from /usr/include/panda3d/convert_srgb.h:57:0,
from /usr/include/panda3d/pnmImage.h:23,
from /usr/include/panda3d/texture.h:43,
from /usr/include/panda3d/shaderInput.h:33,
from /usr/include/panda3d/nodePath.h:41,
from /usr/include/panda3d/windowFramework.h:19,
from /usr/include/panda3d/pandaFramework.h:21,
from /home/plaristote/Work/fallout-equestria/code/game/include/level/level.hpp:5,
from /home/plaristote/Work/fallout-equestria/code/game/include/gametask.hpp:5,
from /home/plaristote/Work/fallout-equestria/code/game/src/script_api.cpp:4:
/usr/include/panda3d/convert_srgb.I: In function 'constexpr unsigned char encode_sRGB_uchar(unsigned char)':
/usr/include/panda3d/convert_srgb.I:94:1: error: the value of 'to_srgb8_table' is not usable in a constant expression
}
^
In file included from /usr/include/panda3d/pnmImage.h:23:0,
from /usr/include/panda3d/texture.h:43,
from /usr/include/panda3d/shaderInput.h:33,
from /usr/include/panda3d/nodePath.h:41,
from /usr/include/panda3d/windowFramework.h:19,
from /usr/include/panda3d/pandaFramework.h:21,
from /home/plaristote/Work/fallout-equestria/code/game/include/level/level.hpp:5,
from /home/plaristote/Work/fallout-equestria/code/game/include/gametask.hpp:5,
from /home/plaristote/Work/fallout-equestria/code/game/src/script_api.cpp:4:
/usr/include/panda3d/convert_srgb.h:25:62: note: 'to_srgb8_table' was not declared 'constexpr'
extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const unsigned char to_srgb8_table[256];
Any clue what’s up with that ?