oriol
oriol

Reputation: 11

I have installed C in my PC but I can not open a new project

I just have downloaded Visual studio 2022 community edition on my 64bit PC, which operates with Windows 10 home. When I try to open a new project, I do not have C as an option, in fact there is no option available at all.

I do not know If something went wrong during the installation? Perhaps I need to add some additional setups after the download?

Here is a screen shot of my computer, when I try to open a new C project.

C new project screen shot

Upvotes: 0

Views: 134

Answers (1)

Dou Xu-MSFT
Dou Xu-MSFT

Reputation: 3231

Noticed that you have fixed the issue after reinstalling Visual Studio. Add more information here.

Visual Studio 2022 doesn't have a separate template for C. You have to create a C++ project, but use ".c" in your filenames, or change the default to compile as C code.

As the Compile a C program on the command line says,

By default, the MSVC compiler treats all files that end in .c as C source code, and all files that end in .cpp as C++ source code. To force the compiler to treat all files as C no matter the file name extension, use the /TC compiler option.

  1. Install workload Desktop development with C++.
  2. Follow these steps to create and compile c project.

Upvotes: 0

Related Questions