Buck-yeh-bux build failed with error C7595 in MSVC
LilyWangLL opened this issue · 0 comments
LilyWangLL commented
Hello, I'm a member of Microsoft VCPKG, when I built this port in an internal version of Visual Studio, it failed with following errors:
src\XException.cpp(49): error C7595: 'fmt::v8::basic_format_string<char,int,const char (&)[30],const DWORD &,const DWORD &,void *,void *,const DWORD &>::basic_format_string': call to immediate function is not a constant expression
This error is because of the format string is incorrect, it could be fixed by change the following codes in XException.cpp:
if (const EXCEPTION_RECORD *er =pInfo->ExceptionRecord)
RUNTIME_ERROR("code 0x{:x}, flags 0x{:x}, extra 0x{:x}, ip 0x{:x}, arg#{:x}",
er->ExceptionCode,
er->ExceptionFlags,
static_cast<void*>(er->ExceptionRecord),
static_cast<void*>(er->ExceptionAddress),
er->NumberParameters);
Changed to:
if (const EXCEPTION_RECORD *er =pInfo->ExceptionRecord)
RUNTIME_ERROR("code 0x{:x}, flags 0x{:x}, extra 0x{:x}, ip 0x{:x}, arg#{:x}",
er->ExceptionCode,
er->ExceptionFlags,
(size_t)static_cast<void*>(er->ExceptionRecord),
(size_t)static_cast<void*>(er->ExceptionAddress),
er->NumberParameters);
Could you please fix this problem? If you need any information, please contact me directly. Thanks in advance.