Monero-Pool
Monero-Pool copied to clipboard
Error compiling in VS2017:
Platform-Toolset: Visual Studio 2017 (v141)
C2864 'std::ratio<_Nx,_Dx>::num': a static data member with an in-class initializer must have non-volatile const integral type
Hi, use vs 2012. I got it to build and run. However see issue 3 on this thread - was the result (stack overflow) Code is broken, grr
The error is due to the keyword constexpr, (https://stackoverflow.com/questions/42298214/constexpr-in-c11-and-c14-not-a-difference-to-const-keyword), to remove error (with a workaround) is possible change the define constexpr in the file "serialization.h" at line 49 with a no-compiler keyword, and CryptoNight will compile in VS2017. Then set the CryptoNight correct linker reference for the libboost_serialization-vc141-mt-*.lib library of Boost C++.
serialization.h
47 #ifndef __GNUC__
48 #ifndef constexpr
49 #define dummy
50 #endif
51 #endif