Use 'SPDLOG_FMT_RUNTIME' to fix compilation error throwed MSVC and fmt 9.1.x #2517
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the first time I submit a PR to the open source community. I try to submit code and instructions according to the rules I have learned, but there may be inappropriate places to do it. Please also point out my problems actively, I will try to do it as soon as possible. Learn and correct.
fmt 9.1.x added compile-time checks for wide strings, so when compiled with MSVC and this or later version of fmt(9.1.x), codes belows will throw a compilation error #(#2512).
spdlog/include/spdlog/sinks/daily_file_sink.h
Lines 80 to 84 in d011332
When compiled with
SPDLOG_WCHAR_FILENAMES
with a newer verision of fmt(9.1.x) using MSVC,SPDLOG_FMT_RUNTIME
will solve the problem.