can't find stdio.h in new Visual Studio 2017 Community project












0















I found questions for the issue I'm having, but none of the solutions worked for me. I'm asking a new question instead of adding a comment to an existing question. I developed in C++ years ago, but this is the first I have tried to build a c++ program on Windows 10 with VS 2017 Community edition.



I installed Visual Studio 2017 community edition and created a blank C++ console project. When I try to build I get



fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory



I went back to the installer and the Windows 10 SDK is checked:
Windows 10 SDK (10.0.16299.0) for Desktop C++



My VC include folder is set to:
$(VC_IncludePath);$(WindowsSDK_IncludePath);



Which evaluates to:
C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.11.25503include
C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.11.25503atlmfcinclude
C:Program Files (x86)Microsoft Visual Studio2017CommunityVCAuxiliaryVSinclude
C:Program Files (x86)Windows Kits10Include10.0.10240.0ucrt
C:Program Files (x86)Windows Kits8.1Includeum
C:Program Files (x86)Windows Kits8.1Includeshared
C:Program Files (x86)Windows Kits8.1Includewinrt



Where should stdio.h and the rest of the C and C++ standard includes be?



If I comment out stdio.h, and try to include I get
1>c:program files (x86)microsoft visual studio2017communityvctoolsmsvc14.11.25503includecrtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory



If I comment out all includes, the linker can't find
'ucrtd.lib



In the project setup for Windows SKD, the project has 8.1. If I try to change it to 10, I get "The SDK version was not found".



If I right click on the solution and select "Retarget solution", the only choice is 8.1.



So my question is where should the headers be? This system does have older Visual studio's installed.










share|improve this question























  • Use #include <cstdio> when writing C++ code

    – Rishi
    Nov 13 '17 at 4:54






  • 1





    I ran the installer again and noticed that C++ workload wasn't even checked. I'm surprised it let me create a C++ solution when that wasn't installed. I'm an old school c and c++ with MFC developer and haven't tried it in a number of years. The last VS version I did any real c++ development in was 2006.

    – BrianK
    Nov 13 '17 at 5:01








  • 1





    Sounds like a trivial mistake - VTC.

    – MSalters
    Nov 13 '17 at 8:27
















0















I found questions for the issue I'm having, but none of the solutions worked for me. I'm asking a new question instead of adding a comment to an existing question. I developed in C++ years ago, but this is the first I have tried to build a c++ program on Windows 10 with VS 2017 Community edition.



I installed Visual Studio 2017 community edition and created a blank C++ console project. When I try to build I get



fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory



I went back to the installer and the Windows 10 SDK is checked:
Windows 10 SDK (10.0.16299.0) for Desktop C++



My VC include folder is set to:
$(VC_IncludePath);$(WindowsSDK_IncludePath);



Which evaluates to:
C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.11.25503include
C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.11.25503atlmfcinclude
C:Program Files (x86)Microsoft Visual Studio2017CommunityVCAuxiliaryVSinclude
C:Program Files (x86)Windows Kits10Include10.0.10240.0ucrt
C:Program Files (x86)Windows Kits8.1Includeum
C:Program Files (x86)Windows Kits8.1Includeshared
C:Program Files (x86)Windows Kits8.1Includewinrt



Where should stdio.h and the rest of the C and C++ standard includes be?



If I comment out stdio.h, and try to include I get
1>c:program files (x86)microsoft visual studio2017communityvctoolsmsvc14.11.25503includecrtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory



If I comment out all includes, the linker can't find
'ucrtd.lib



In the project setup for Windows SKD, the project has 8.1. If I try to change it to 10, I get "The SDK version was not found".



If I right click on the solution and select "Retarget solution", the only choice is 8.1.



So my question is where should the headers be? This system does have older Visual studio's installed.










share|improve this question























  • Use #include <cstdio> when writing C++ code

    – Rishi
    Nov 13 '17 at 4:54






  • 1





    I ran the installer again and noticed that C++ workload wasn't even checked. I'm surprised it let me create a C++ solution when that wasn't installed. I'm an old school c and c++ with MFC developer and haven't tried it in a number of years. The last VS version I did any real c++ development in was 2006.

    – BrianK
    Nov 13 '17 at 5:01








  • 1





    Sounds like a trivial mistake - VTC.

    – MSalters
    Nov 13 '17 at 8:27














0












0








0








I found questions for the issue I'm having, but none of the solutions worked for me. I'm asking a new question instead of adding a comment to an existing question. I developed in C++ years ago, but this is the first I have tried to build a c++ program on Windows 10 with VS 2017 Community edition.



I installed Visual Studio 2017 community edition and created a blank C++ console project. When I try to build I get



fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory



I went back to the installer and the Windows 10 SDK is checked:
Windows 10 SDK (10.0.16299.0) for Desktop C++



My VC include folder is set to:
$(VC_IncludePath);$(WindowsSDK_IncludePath);



Which evaluates to:
C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.11.25503include
C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.11.25503atlmfcinclude
C:Program Files (x86)Microsoft Visual Studio2017CommunityVCAuxiliaryVSinclude
C:Program Files (x86)Windows Kits10Include10.0.10240.0ucrt
C:Program Files (x86)Windows Kits8.1Includeum
C:Program Files (x86)Windows Kits8.1Includeshared
C:Program Files (x86)Windows Kits8.1Includewinrt



Where should stdio.h and the rest of the C and C++ standard includes be?



If I comment out stdio.h, and try to include I get
1>c:program files (x86)microsoft visual studio2017communityvctoolsmsvc14.11.25503includecrtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory



If I comment out all includes, the linker can't find
'ucrtd.lib



In the project setup for Windows SKD, the project has 8.1. If I try to change it to 10, I get "The SDK version was not found".



If I right click on the solution and select "Retarget solution", the only choice is 8.1.



So my question is where should the headers be? This system does have older Visual studio's installed.










share|improve this question














I found questions for the issue I'm having, but none of the solutions worked for me. I'm asking a new question instead of adding a comment to an existing question. I developed in C++ years ago, but this is the first I have tried to build a c++ program on Windows 10 with VS 2017 Community edition.



I installed Visual Studio 2017 community edition and created a blank C++ console project. When I try to build I get



fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory



I went back to the installer and the Windows 10 SDK is checked:
Windows 10 SDK (10.0.16299.0) for Desktop C++



My VC include folder is set to:
$(VC_IncludePath);$(WindowsSDK_IncludePath);



Which evaluates to:
C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.11.25503include
C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.11.25503atlmfcinclude
C:Program Files (x86)Microsoft Visual Studio2017CommunityVCAuxiliaryVSinclude
C:Program Files (x86)Windows Kits10Include10.0.10240.0ucrt
C:Program Files (x86)Windows Kits8.1Includeum
C:Program Files (x86)Windows Kits8.1Includeshared
C:Program Files (x86)Windows Kits8.1Includewinrt



Where should stdio.h and the rest of the C and C++ standard includes be?



If I comment out stdio.h, and try to include I get
1>c:program files (x86)microsoft visual studio2017communityvctoolsmsvc14.11.25503includecrtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory



If I comment out all includes, the linker can't find
'ucrtd.lib



In the project setup for Windows SKD, the project has 8.1. If I try to change it to 10, I get "The SDK version was not found".



If I right click on the solution and select "Retarget solution", the only choice is 8.1.



So my question is where should the headers be? This system does have older Visual studio's installed.







c++ visual-studio-2017






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '17 at 4:45









BrianKBrianK

1,13032132




1,13032132













  • Use #include <cstdio> when writing C++ code

    – Rishi
    Nov 13 '17 at 4:54






  • 1





    I ran the installer again and noticed that C++ workload wasn't even checked. I'm surprised it let me create a C++ solution when that wasn't installed. I'm an old school c and c++ with MFC developer and haven't tried it in a number of years. The last VS version I did any real c++ development in was 2006.

    – BrianK
    Nov 13 '17 at 5:01








  • 1





    Sounds like a trivial mistake - VTC.

    – MSalters
    Nov 13 '17 at 8:27



















  • Use #include <cstdio> when writing C++ code

    – Rishi
    Nov 13 '17 at 4:54






  • 1





    I ran the installer again and noticed that C++ workload wasn't even checked. I'm surprised it let me create a C++ solution when that wasn't installed. I'm an old school c and c++ with MFC developer and haven't tried it in a number of years. The last VS version I did any real c++ development in was 2006.

    – BrianK
    Nov 13 '17 at 5:01








  • 1





    Sounds like a trivial mistake - VTC.

    – MSalters
    Nov 13 '17 at 8:27

















Use #include <cstdio> when writing C++ code

– Rishi
Nov 13 '17 at 4:54





Use #include <cstdio> when writing C++ code

– Rishi
Nov 13 '17 at 4:54




1




1





I ran the installer again and noticed that C++ workload wasn't even checked. I'm surprised it let me create a C++ solution when that wasn't installed. I'm an old school c and c++ with MFC developer and haven't tried it in a number of years. The last VS version I did any real c++ development in was 2006.

– BrianK
Nov 13 '17 at 5:01







I ran the installer again and noticed that C++ workload wasn't even checked. I'm surprised it let me create a C++ solution when that wasn't installed. I'm an old school c and c++ with MFC developer and haven't tried it in a number of years. The last VS version I did any real c++ development in was 2006.

– BrianK
Nov 13 '17 at 5:01






1




1





Sounds like a trivial mistake - VTC.

– MSalters
Nov 13 '17 at 8:27





Sounds like a trivial mistake - VTC.

– MSalters
Nov 13 '17 at 8:27












1 Answer
1






active

oldest

votes


















-1














I had the same issue albeit instead trying to use Code Blocks instead of Visual Studio. I'm on Windows 10, so your mileage may vary, but here is the path where I found stdio.h:



C:Program Files (x86)Windows Kits10Include10.0.17763.0ucrt



If you too are on Windows 10, I guess what might change is the specific version number between Include and ucrt



I know this goes along the right path because now when building I get a different error to the effect of "Cannot open file LIBCMT.lib". The location though is back under Visual Studio, specifically:



C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023libx86



So maybe the issue won't crop up with Visual Studio IDE, but, despite finding LINK: fatal error LNK 1104: cannot open file 'LIBCMT.lib' and trying a couple of the suggested solutions, I'm still struggling, and intend to open a similar question but pointing out that I'm using Code Blocks if that makes any difference.






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47257211%2fcant-find-stdio-h-in-new-visual-studio-2017-community-project%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    -1














    I had the same issue albeit instead trying to use Code Blocks instead of Visual Studio. I'm on Windows 10, so your mileage may vary, but here is the path where I found stdio.h:



    C:Program Files (x86)Windows Kits10Include10.0.17763.0ucrt



    If you too are on Windows 10, I guess what might change is the specific version number between Include and ucrt



    I know this goes along the right path because now when building I get a different error to the effect of "Cannot open file LIBCMT.lib". The location though is back under Visual Studio, specifically:



    C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023libx86



    So maybe the issue won't crop up with Visual Studio IDE, but, despite finding LINK: fatal error LNK 1104: cannot open file 'LIBCMT.lib' and trying a couple of the suggested solutions, I'm still struggling, and intend to open a similar question but pointing out that I'm using Code Blocks if that makes any difference.






    share|improve this answer






























      -1














      I had the same issue albeit instead trying to use Code Blocks instead of Visual Studio. I'm on Windows 10, so your mileage may vary, but here is the path where I found stdio.h:



      C:Program Files (x86)Windows Kits10Include10.0.17763.0ucrt



      If you too are on Windows 10, I guess what might change is the specific version number between Include and ucrt



      I know this goes along the right path because now when building I get a different error to the effect of "Cannot open file LIBCMT.lib". The location though is back under Visual Studio, specifically:



      C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023libx86



      So maybe the issue won't crop up with Visual Studio IDE, but, despite finding LINK: fatal error LNK 1104: cannot open file 'LIBCMT.lib' and trying a couple of the suggested solutions, I'm still struggling, and intend to open a similar question but pointing out that I'm using Code Blocks if that makes any difference.






      share|improve this answer




























        -1












        -1








        -1







        I had the same issue albeit instead trying to use Code Blocks instead of Visual Studio. I'm on Windows 10, so your mileage may vary, but here is the path where I found stdio.h:



        C:Program Files (x86)Windows Kits10Include10.0.17763.0ucrt



        If you too are on Windows 10, I guess what might change is the specific version number between Include and ucrt



        I know this goes along the right path because now when building I get a different error to the effect of "Cannot open file LIBCMT.lib". The location though is back under Visual Studio, specifically:



        C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023libx86



        So maybe the issue won't crop up with Visual Studio IDE, but, despite finding LINK: fatal error LNK 1104: cannot open file 'LIBCMT.lib' and trying a couple of the suggested solutions, I'm still struggling, and intend to open a similar question but pointing out that I'm using Code Blocks if that makes any difference.






        share|improve this answer















        I had the same issue albeit instead trying to use Code Blocks instead of Visual Studio. I'm on Windows 10, so your mileage may vary, but here is the path where I found stdio.h:



        C:Program Files (x86)Windows Kits10Include10.0.17763.0ucrt



        If you too are on Windows 10, I guess what might change is the specific version number between Include and ucrt



        I know this goes along the right path because now when building I get a different error to the effect of "Cannot open file LIBCMT.lib". The location though is back under Visual Studio, specifically:



        C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023libx86



        So maybe the issue won't crop up with Visual Studio IDE, but, despite finding LINK: fatal error LNK 1104: cannot open file 'LIBCMT.lib' and trying a couple of the suggested solutions, I'm still struggling, and intend to open a similar question but pointing out that I'm using Code Blocks if that makes any difference.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 25 '18 at 1:10

























        answered Nov 25 '18 at 0:30









        George JemptyGeorge Jempty

        6,9611161131




        6,9611161131






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47257211%2fcant-find-stdio-h-in-new-visual-studio-2017-community-project%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Contact image not getting when fetch all contact list from iPhone by CNContact

            count number of partitions of a set with n elements into k subsets

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks