Tony Tannous February 2016

How to start a C project in VS 2015

I have Visual Studio 2015, and I was wondering if it supports C.

I press on "New Project" and the options are Visual C#, Visual C++, Visual Basic.

I was wondering if I could compile a C programm or do one in VS. Does it have a C compiler ?

I am lost.

Thanks in Advance.

Answers


Douglas DeTellem February 2016

Create a visual c++ project.

Just rename your source file from .cpp to .c

No special conversions required. Just type your valid c code and it will compile just fine.


Plasticcaz February 2016

You can either do as Douglas DeTellem has suggested (Simply start a C++ project, change the extension to ".c", and just use their C++ compiler (C++, is of course, a superset of C), or you can try downloading MinGW (http://www.mingw.org/) and installing the Windows version of gcc, which supports the old C standard.

If you really want an IDE, try looking at Codeblocks (http://www.codeblocks.org). If you pick the download with MinGW, it will include the C compiler, and help you.

I tend to prefer using a text editor (in my case, gVim) and using a command prompt to run gcc, or cl (the Visual Studio command line call to the compiler and linker) to compile my programs.

Post Status

Asked in February 2016
Viewed 2,489 times
Voted 6
Answered 2 times

Search




Leave an answer