I get errors from net.cpp and other modules (see below) about INT64_MIN and other constants not being defined. Including <inttypes.h>, <stdint.h>, or <limits.h> doesn't help, and neither does #defining __STDC_LIMIT_MACROS. These headers seem to work differently in C++ from C.
To make the modules compile, I had to write a header that #defines these constants in terms of the C++ numeric_limits template:
<pre> #ifndef CPPLIMITS_H #define CPPLIMITS_H #include <limits> #include <inttypes.h> #define INT64_MAX std::numeric_limits<int64>::max() #define INT64_MIN std::numeric_limits<int64>::min() #define UINT64_MIN std::numeric_limits<uint64>::min() #define UINT64_MAX std::numeric_limits<uint64>::max() #endif </pre>
The following source files needed to include this header:
<ul> <li> net.cpp</li> <li> wallet.cpp</li> <li> util.cpp</li> </ul>