Visual Studio not creating .exe for C++ Program.

Piyawat Klungkasam 1 Reputation point
2022-08-11T02:44:08.82+00:00

230194-capture1.png230275-capture2.png230177-capture.png
I make Project

Developer technologies Visual Studio Debugging
Developer technologies C++
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 60,161 Reputation points
    2022-08-11T02:56:55.293+00:00

    The first screenshot tells it all. You have compiler errors. Since your code doesn't compile then no exe can be produced. You have to fix the compiler errors.

    The actual error is that it cannot find the crtdbg.h system header file. It sounds like maybe you don't have the Windows SDK installed as that is where the header file resides. Run the VS Installer and modify your installation. Then go to Workloads and find the Windows 10 SDK. If it is not checked then check it and install. Once it is done then rebuild your code.

    If it is installed then the issue might be your project is targeting a version of the SDK that isn't installed. Open your project's property settings. One of the first options is the version of the SDK to target. You should ensure it matches the version of the SDK that you do have installed.

    0 comments No comments

Your answer

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