Skip to content
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

Can't include spdlog #2121

Closed
arnekuchenbecker opened this issue Sep 27, 2021 · 2 comments
Closed

Can't include spdlog #2121

arnekuchenbecker opened this issue Sep 27, 2021 · 2 comments

Comments

@arnekuchenbecker
Copy link

I can't build my project as soon as I include spdlog. Building fails with the following error messages:
1>------ Build started: Project: Dawn, Configuration: Debug x64 ------ 1>Log.cpp 1>d:\dokumente\programming\dawn\dawn\vendor\spdlog\include\spdlog\fmt\bundled\core.h(2729): error C2131: expression did not evaluate to a constant 1>d:\dokumente\programming\dawn\dawn\vendor\spdlog\include\spdlog\fmt\bundled\core.h(2729): note: a non-constant (sub-)expression was encountered 1>d:\dokumente\programming\dawn\dawn\vendor\spdlog\include\spdlog\fmt\bundled\core.h(2835): note: see reference to function template instantiation 'void fmt::v8::detail::check_format_string<fmt::v8::string_view&,const char(&)[3],S,0>(S)' being compiled 1> with 1> [ 1> S=fmt::v8::detail::format_error_code::<lambda_fe71a6a0c02ab17f222163df7410fde1>::()::FMT_COMPILE_STRING 1> ] 1>d:\dokumente\programming\dawn\dawn\vendor\spdlog\include\spdlog\fmt\bundled\format-inl.h(74): note: see reference to function template instantiation 'fmt::v8::basic_format_string<char,fmt::v8::string_view &,const char (&)[3]>::basic_format_string<fmt::v8::detail::format_error_code::<lambda_fe71a6a0c02ab17f222163df7410fde1>::()::FMT_COMPILE_STRING,0>(const S &)' being compiled 1> with 1> [ 1> S=fmt::v8::detail::format_error_code::<lambda_fe71a6a0c02ab17f222163df7410fde1>::()::FMT_COMPILE_STRING 1> ] 1>d:\dokumente\programming\dawn\dawn\vendor\spdlog\include\spdlog\fmt\bundled\format-inl.h(74): note: see reference to function template instantiation 'fmt::v8::basic_format_string<char,fmt::v8::string_view &,const char (&)[3]>::basic_format_string<fmt::v8::detail::format_error_code::<lambda_fe71a6a0c02ab17f222163df7410fde1>::()::FMT_COMPILE_STRING,0>(const S &)' being compiled 1> with 1> [ 1> S=fmt::v8::detail::format_error_code::<lambda_fe71a6a0c02ab17f222163df7410fde1>::()::FMT_COMPILE_STRING 1> ] 1>d:\dokumente\programming\dawn\dawn\vendor\spdlog\include\spdlog\fmt\bundled\core.h(2724): fatal error C1903: unable to recover from previous error(s); stopping compilation 1>Done building project "Dawn.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

This error also persists if I don't create any loggers but just include spdlog in my header file (using #include "spdlog/spdlog.h" and having added spdlog/include as an include directory in Visual Studio)

@tt4g
Copy link
Contributor

tt4g commented Sep 27, 2021

This is fmt problem (fmtlib/fmt#2478).
Try the workaround described in the comments, or use another version fmt with the external fmt option.

@arnekuchenbecker
Copy link
Author

Updating my Visual Studio installation fixed this. Thanks for the reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants