Can I compile pure C code in Visual Studio?

Shervan360 1,621 Reputation points
2022-02-27T20:31:44.753+00:00

Hello,

Can I compile pure C code in Visual Studio?
We can change the extension file to .c but I think the code compiles in Visual C++.
I want to compile C code in C compiler in Visual Studio, not in C++ compiler.

Thank you

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,785 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Petrus 【KIM】 461 Reputation points
    2022-03-28T01:43:30.96+00:00

    cl.exe is a tool that controls the Microsoft C++ (MSVC) C and C++ compilers and linker.

    https://learn.microsoft.com/en-us/cpp/build/reference/compiler-options?view=msvc-170

    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.