“If you have installed Microsoft Visual C++ Build Tools 2015 on Windows 10, open the Start menu and choose All apps. Scroll down and open the Visual C++ Build Tools folder. Choose Visual C++ 2015 x86 Native Tools Command Prompt to open the command prompt window.”
1) for single file source file
cl -> gcc , but the command options is different,
cl /EHsc hello.cpp
2) for a small project, CMake is recommended,
it is handy to write one from example
In your source code folder:
md build && cd build && cmake ..
nmake instead of
3) for exsitent vs solution using msbuild:
compile visual studio solution/project designed by VS IDE, no corresponding command on Linux.
search “MSBuild Command-Line Reference”
In the near future, other light weight IDE might support detecting “Visual Studio Build Tools”, e.g QtCreatorBSD documentation licensed Free for non-commercial usage only
Author: Qingfeng XIA copyright (C) 2011-2013 http://www.iesensor.com
please keep the original link in your reference. http://www.iesensor.com/blog/2016/12/06/compile-c-codes-using-visual-c-build-tools-from-the-command-prompt/