How can I create a working C++ file in which the compiler outputs a simple Hello World without getting 475 errors.

Clemens Fischer 0 Reputation points
2023-07-21T15:43:44.0333333+00:00

Since many weeks I tried to programm C++ in visual studio, but the compiler always gives me 475 errors, so I thought the reson is the SDK. After changing between some different Windows SDKs it worked, but about one week later it stopped working again.

Developer technologies | Visual Studio | Debugging
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,151 Reputation points Microsoft External Staff
    2023-07-24T08:00:57.34+00:00

    Hi @Clemens Fischer

    Welcome to Microsoft Q&A! 

    Does it occur in all projects or specific project? 

    As you said, you changed the Windows SDKs before. Can you install the Windows 11 SDK (10.0.22621.0) via Visual Studio Installer?

    Then, run VS as administrator and change the Windows SDK Version in project property to the latest version. 

    Besides, the crtdbg.h should be located at C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt.

    If you find the crtdbg.h on a different path, please copy the directory path where the crtdbg.h is located.

    Then, manually add the path into Include Directories and rebuild your project. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    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.

     


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.