I quickly searched the forum but I didn't find it.
I adapted my previous script to:
cl /std:c++latest /DNDEBUG /DUSE_POPCNT /GS- /MT /O2 /Oi /Ot /Oy /GL /EHsc *.cpp nnue/*.cpp nnue/features/*.cpp syzygy/*.cpp /link /STACK:reserve=8388608 /OUT:stockfish.exe advapi32.lib
However it doesn't embed the network and works only after setting the UCI option "Use NNUE" to false.
Can someone please post the visual studio command equivalent to the Linux "make -j build ARCH=x86-64-modern" ?
Thanks.
Compile Stockfish NNUE with Visual Studio
Moderators: hgm, Rebel, chrisw
-
- Posts: 134
- Joined: Thu Jul 24, 2014 2:49 pm
Re: Compile Stockfish NNUE with Visual Studio
Embedding network files will not work with MSVC. See the top of evaluate.cpp:
Code: Select all
// Macro to embed the default NNUE file data in the engine binary (using incbin.h, by Dale Weiler).
// This macro invocation will declare the following three variables
// const unsigned char gEmbeddedNNUEData[]; // a pointer to the embedded data
// const unsigned char *const gEmbeddedNNUEEnd; // a marker to the end
// const unsigned int gEmbeddedNNUESize; // the size of the embedded file
// Note that this does not work in Microsof Visual Studio.