Ryan-rsm-McKenzie / CommonLibF4

A reverse-engineered resource for Fallout 4
MIT License
67 stars 34 forks source link

Build fails when using vs-2022-vcpkg #7

Open J-Dawe opened 2 years ago

J-Dawe commented 2 years ago

When I try to build with the vs-2022-vcpkg preset, the build fails with the following error repeating multiple times

D:\Projects\fallout4\CommonLibF4\CommonLibF4\include\F4SE/Logger.h(35,2): error C7595: 'fmt::v8::basic_format_string<char,std::string_view &>::basic_format_string': call to immediate function is not a constant expression (compiling source file D:\Projects\fallout4\CommonLibF4\CommonLibF4\src\F4SE\API.cpp) [D:\Projects\fallout4\CommonLibF4\build\CommonLibF4\CommonLibF4.vcxproj] D:\Projects\fallout4\CommonLibF4\CommonLibF4\include\F4SE/Logger.h(35,2): message : failure was caused by a read of a variable outside its lifetime (compiling source file D:\Projects\fallout4\CommonLibF4\CommonLibF4\src\F4SE\API.cpp) [D:\Projects\fallout4\CommonLibF4\build\CommonLibF4\CommonLibF4.vcxproj] D:\Projects\fallout4\CommonLibF4\CommonLibF4\include\F4SE/Logger.h(35,2): error C7595: 'fmt::v8::basic_format_string<char,const char *>::basic_format_string': call to immediate function is not a constant expression (compiling source file D:\Projects\fallout4\CommonLibF4\CommonLibF4\src\F4SE\Interfaces.cpp) [D:\Projects\fallout4\CommonLibF4\build\CommonLibF4\CommonLibF4.vcxproj] D:\Projects\fallout4\CommonLibF4\CommonLibF4\include\F4SE/Logger.h(35,2): message : see usage of 'a_fmt' (compiling source file D:\Projects\fallout4\CommonLibF4\CommonLibF4\src\F4SE\API.cpp) [D:\Projects\fallout4\CommonLibF4\build\CommonLibF4\CommonLibF4.vcxproj] D:\Projects\fallout4\CommonLibF4\CommonLibF4\include\F4SE/Logger.h(35,2): message : failure was caused by a read of a variable outside its lifetime (compiling source file D:\Projects\fallout4\CommonLibF4\CommonLibF4\src\F4SE\Interfaces.cpp) [D:\Projects\fallout4\CommonLibF4\build\CommonLibF4\CommonLibF4.vcxproj] D:\Projects\fallout4\CommonLibF4\CommonLibF4\src\F4SE\API.cpp(112): message : see reference to function template instantiation 'F4SE::log::warn<F4SE::stl::zstring &>::warn<F4SE::GetPluginInfo::::()::FMT_COMPILE_STRING>(T &&,F4SE::stl::zstring &,std::source_location)' being compiled [D:\Projects\fallout4\CommonLibF4\build\CommonLibF4\CommonLibF4.vcxproj]

Full command line output

magnusjjj commented 11 months ago

Same here. Apparantly it's an upstream issue that won't be fixed. It wants to know the string format at compile time.

Only visual studio 2019 version 16.11, which is newer, is now available to download. Will try that.