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.

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
967 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 27,891 Reputation points Microsoft Vendor
    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.