-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile error when using spdlog with FMT_ENFORCE_COMPILE_STRING #2379
Comments
Please wrap the format string with the spdlog::info(FMT_STRING("Log with {}."), "macro"); // OK.
spdlog::info("Log without {}.", "macro"); // Assertion error. |
Thanks for the feedback! In this case, I only have |
Actually, there still may be a problem here building for Android... When I include
I'm building with SPDLOG_COMPILED_LIB and FMT_ENFORCE_COMPILE_STRING defined. |
The spdlog/include/spdlog/details/fmt_helper.h Lines 101 to 112 in 0d8197c
The following fix should work around the problem. -fmt_lib::format_to(std::back_inserter(dest), "{:02}", n);
+fmt_lib::format_to(std::back_inserter(dest), FMT_STRING("{:02}"), n); And can you submit a PR? |
I think I may have found a few other spots that need the FMT_STRING, I'll submit a PR. |
I'm building an exe that uses spdlog and fmt. I'm building with FMT_ENFORCE_COMPILE_STRING defined. This is causing the following compile error:
Not sure what I'm doing wrong, any help would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: