It sounds like a problem with the way yo setup the project or the compiler.
The output below uses the Visual Studio 2019 Command Line Tools. It uses the compiler version 19.28.29915 and cryptest.nmake to build from the command line. I modified
cryptest.nmake to include the /std:c++17 flag.
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.9.5
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
C:\Users\Jeff\cryptopp>nmake /f cryptest.nmake
Microsoft (R) Program Maintenance Utility Version 14.28.29915.0
Copyright (C) Microsoft Corporation. All rights reserved.
******************************
Platform is x86
******************************
cl.exe /nologo /W4 /wd4231 /wd4511 /wd4156 /D_MBCS /Zi /TP /GR /EHsc /st
d:c++17 /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT /FI sdkddkver.h /FI winapifamily.h /Y
c"pch.h" /Fp"pch.pch" /c pch.cpp
pch.cpp
cl.exe /nologo /W4 /wd4231 /wd4511 /wd4156 /D_MBCS /Zi /TP /GR /EHsc /st
d:c++17 /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT /FI sdkddkver.h /FI winapifamily.h /c
cryptlib.cpp
cryptlib.cpp
cl.exe /nologo /W4 /wd4231 /wd4511 /wd4156 /D_MBCS /Zi /TP /GR /EHsc /st
d:c++17 /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT /FI sdkddkver.h /FI winapifamily.h /c
cpu.cpp
cpu.cpp
cl.exe /nologo /W4 /wd4231 /wd4511 /wd4156 /D_MBCS /Zi /TP /GR /EHsc /st
d:c++17 /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT /FI sdkddkver.h /FI winapifamily.h /c
integer.cpp
integer.cpp
...
Jeff