question

empleat-6716 avatar image
0 Votes"
empleat-6716 asked empleat-6716 commented

How to enable C11 standard in VS 19???

According to ms you should enable Windows SDK 10.0.20348.0 in VS installer. Problem is it is missing!
https://docs.microsoft.com/en-us/cpp/overview/install-c17-support?view=msvc-160

How do I enable C11 standard in Visual Studio 2019? It is not listed under C++ standards, I have there C14, C17 only.

I tried C11 code and it throwed error and I googled - it is because VS 19 doesn't fully support C11. And didn't find anything other which would be useful.

Please help!

c++
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


If it is not fully supported, then maybe you do not need it.

I think that you have one more try: showing the code that gives the error; perhaps it can be adjusted.


0 Votes 0 ·
Castorix31 avatar image
0 Votes"
Castorix31 answered Castorix31 edited

I have it in [C/C++] [Language] :


123355-c11.jpg



c11.jpg (126.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JeanineZhang-MSFT avatar image
0 Votes"
JeanineZhang-MSFT answered empleat-6716 commented

Hi,

According to the Doc: Install C11 and C17 support in Visual Studio

Support for C11 and C17 standards is available starting in Visual Studio 2019 version 16.8. Support requires an updated Universal C Runtime (UCRT) and the latest Windows SDK updates, to work properly with the conforming preprocessor (/Zc:preprocessor).

As far as I'm concerned, you could try to download the installer the latest Windows SDK. You could download the latest Windows 10 SDK from the Windows 10 SDK page. And then follow the steps to install the Windows 10 SDK.

It is not listed under C++ standards, and it is listed under C language standard.

123452-image.png

Best Regards,

Jeanine


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (34.3 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for answer! I have it there. I will try to run some C11 code and will let you know, if it still doesn't work.

0 Votes 0 ·

@empleat-6716

Have you got any updates? I am glad to help if you have any other questions.

0 Votes 0 ·

The newer version of the Windows SDK appears to be available through the Visual Studio Installer (VS 2019 version 16.11.0) in the Individual Components tab.

123559-vs-installer-sdks.png


0 Votes 0 ·