Изучите Излишне любопытный: http://sourceforge.net/projects/snoopy/
Если у вас есть Visual Studio, у вас также есть компилятор командной строки C, который Visual Studio вызывает при сборке вашего проекта. Так что вам просто нужно вызвать его из командной строки.
Вы также можете бесплатно скачать компилятор C, доступно множество опций, таких как http://gcc.gnu.org/releases. html или см. http://www.thefreecountry.com/compilers/cpp.shtml
Если мы предполагаем, что вы используете компилятор Microsoft C / C ++ (cl.exe, который будет в VC подкаталог вашей установки Visual Studio), откройте командную строку Visual Studio (в ней будут установлены соответствующие пути). Чтобы скомпилировать файл с именем "helloworld.c", введите:
cl helloworld.c
Для получения дополнительной информации см. документацию MSDN .
%comspec% /k ""c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86
run above code in command prompt (visual studio 2010, editor: notepad.exe recommend)
c:\temp> cl.exe hello.c
If you're talking about not using the IDE GUI, an alternative is to set up a project for your C file as you normall would and call devenv.com to compile that project. It will then pass all the required paths and settings to the compiler and linker. We use that to compile some projects on our build servers. To learn more, type 'devenv.com /?'.
Regards,
Sebastiaan
Подробнее об этом здесь: http://msdn.microsoft.com/en-us/library/ms235639 (VS.80) .aspx
MSDN - отличный источник дополнительной информации.
Compiling the 'c' file from command line is easy and you have many answers to start with. However working with projects is a different thing and you will need to have a tool that will do it. Microsoft nmake was mentioned before, but i will suggest using gnu make utility that used for managing build. It is compiler independent, old (meaning proven) and very flexible tools that will allow you to create very robust build environment.
Lots of options out there. As mentioned by driis, there are lots of free c compilers available to download.
If you just want to compile code on a machine that has visual studio on it, microsoft offers several tools that allow command line use and project management:
Microsoft have reference documents for command line building.
Another options is MonoDevelop - an open source ide that understand visual studio project files.