archit120 / Monero-Pool

An open source monero Pool written in C# and C++ for maximum speed and efficiency. Uses Redis as database
20 stars 12 forks source link

Error compiling in VS2017: #3

Open xpat07 opened 6 years ago

xpat07 commented 6 years ago

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

JamieShelley commented 6 years ago

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

goldexone commented 6 years ago

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