M2
M2 copied to clipboard
`cstdint` not included in `VectorArrayAPI.hpp`
Making on Arch gives the following error.
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../src -I../../src/4ti2 -I/home/kss/M2/M2/include -I/home/kss/M2/M2/include -I/home/kss/M2/M2/usr-host/include -isystem /usr/include/libxml2 -DSING_NDEBUG -DOM_NDEBUG -DNDEBUG -I/usr/include/cddlib -I/usr/include/eigen3 -I/usr/include/python3.11 -I/usr/include -DBOOST_STACKTRACE_LINK -I./.. -D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math -Wall -std=c++0x -MT libzsolve_la-RelAPI.lo -MD -MP -MF .deps/libzsolve_la-RelAPI.Tpo -c RelAPI.cpp -fPIC -DPIC -o .libs/libzsolve_la-RelAPI.o
In file included from ../../src/zsolve/RelAPI.h:26,
from RelAPI.cpp:23:
../../src/zsolve/VectorArrayAPI.hpp: In function 'void _4ti2_zsolve_::convert(const T1&, T2&) [with T1 = long int; T2 = int]':
../../src/zsolve/VectorArrayAPI.hpp:79:14: error: 'INT32_MIN' was not declared in this scope; did you mean 'INT_MIN'?
79 | if (v1 < INT32_MIN || v2 > INT32_MAX) {
| ^~~~~~~~~
| INT_MIN
../../src/zsolve/VectorArrayAPI.hpp:79:32: error: 'INT32_MAX' was not declared in this scope
79 | if (v1 < INT32_MIN || v2 > INT32_MAX) {
| ^~~~~~~~~
../../src/zsolve/VectorArrayAPI.hpp:31:1: note: 'INT32_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
30 | #include <cstdlib>
+++ |+#include <cstdint>
31 |
make[6]: *** [Makefile:879: libzsolve_la-RelAPI.lo] Error 1
make[6]: Leaving directory '/home/kss/M2/M2/libraries/4ti2/build/4ti2-1.6.9/src/zsolve'
I included the suggested library, and it worked. Does it have something to do with the the C++ standards, 11 vs 17 ?
edit
I should've included my gcc version, 13.1.1