Can I compile pure C code in Visual Studio?

Shervan360 1,481 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,553 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Petrus 【KIM】 456 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