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
Compilation error using C++ 20 and VS 16.11.1 (C++ 17 works) #2070
Comments
It's a Windows SDK (10.0.19041.0) bug: https://developercommunity2.visualstudio.com/t/std:c17-generates-warning-compiling-Win/1249671?preview=true Update Windows SDK (10.0.20348.0). |
Thank you for the quick answer! I have updated the Windows SDK as you suggested and also rebuilt the library files with the new SDK. My VS project now uses the new SDK version. Indeed the first warning related to Windows SDK disappeared, but the issue is still valid:
|
Template specialization of However, I think you should open an MSVC issue. |
Sorry for the late answer. As you suggested I have created an MSVC issue, it can be accessed at the following link: Template specialization fails using C++20 (spdlog lib fails) Will come back to inform you if the case makes progreess. |
We have a workaround / solution for this issue. Removing the "/translateinclude" (documentation) option from the MSVC compiler solves the compilation issue now. This is a MSVC issue which is being investigated now. For further information and improvements please follow the MSVC case linked in my previous comment as new helpful feedbacks might still come from Microsoft. Thank you for taking a look and giving suggestions! 😄 |
I am using the following environment:
Visual Studio 2019 - 16.11.1 (latest release at the time of writing)
MSVC 19.29.30133.0 (used by cmake and VS)
ISO C++20 Standard (/std:c++20)
spdlog commit 5df9b11, v 1.9.2, branch v1.x (latest at the time of writing)
Platform toolset: Visual Studio 2019 (v142)
I have a C++ project where I have the spdlog dependencies included and only by having the following line in my code:
.. the compiler gives the following errors:
Notes:
Since it works with C++17 and it already worked with later VS releases I think that it is not a dependency problem or a misconfiguration somewhere. If you think it is, please give me suggestions. Having this issue fixed would be very helpful. 🙏
The text was updated successfully, but these errors were encountered: