开发环境:

win10 + Microsoft Visual C++ Build Tools 2015

-----------------------------------------------------------------

The Microsoft Visual C++ Build Tools installs only the command-line compiler, tools, and libraries you need to build C and C++ programs. It's perfect for build labs or classroom exercises and installs relatively quickly. To install only the command-line tools, download and install Microsoft Visual C++ Build Tools 2015.

The following tools can help you to build a C/C++ project on the command line.

1. CL

Use the compiler (cl.exe) to compile and link source code files into apps, libraries, and DLLs.

2. Link

Use the linker (link.exe) to link compiled object files and libraries into apps and DLLs.

3. MSBuild (Visual C++)

Use MSBuild (msbuild.exe) to build Visual C++ projects and Visual Studio solutions. This is equivalent to running the Build project or Build Solution command in the Visual Studio IDE.

4. DEVENV

Use DEVENV (devenv.exe) combined with a command-line switch—for example, /Build or /Clean—to perform certain build commands without displaying the Visual Studio IDE.

5. NMAKE

Use NMAKE (nmake.exe) to automate tasks that build Visual C++ projects by using a traditional makefile.

在windows下开发应用或库时,如果不想安装完整的visual studio,可以选择只安装build tools在命令行下进行编译等操作。这样可以节省硬盘空间,实测占用7GB,并且装在了C盘。

1. 下载安装

打开链接下载安装程序: Microsoft Visual C++ Build Tools 2015,双击visualcppbuildtools_full.exe,选择默认即可,点击安装,等待10分钟左右即可完成安装。

2. 准备代码hello_world.c

#include<stdio.h>int main()
{printf("hello vs build tools.\n");printf("press any key to exit.\n");getchar();return 0;}

3. 编译

1)在开始菜单中选择Visual C++ 2015 x86 Native Tools Command Prompt打开命令行,然后切换到hello_world.c所在目录。

2)执行:cl hello_world.c

可看到生成两个文件,分别是hello_world.obj和hello_world.exe

4. 测试

执行:.\hello_world.exe

或直接双击hello_world.exe执行。

visual c++ build tools的安装与使用相关推荐

  1. Windows 典藏篇-vc++运行库安装,Microsoft Visual C++ Build Tools官方工具

    以前: 想安装最全最完整最新的 vc++ 运行库,莫非用 vs2017 安装了,这是 Microsoft 官方出品的,但是安装要安装整个 vs,非常的麻烦. 如今: 终于,终于,被我找到了这款工具! ...

  2. python中用pip安装出现Microsoft Visual C++ 14.0 is required. Get it with Microsoft Visual C++ Build Tools

    上次安装pip install lxml出现了error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Vis ...

  3. Windows 下 vc++运行库安装,Microsoft Visual C++ Build Tools官方工具

    在用pycharm过程中,用pip去安装一些第三方包的时候会出现如下错误,缺少C++编译器,因为有些程序需要使用,没有C++接口会报错,查阅相关资料及自己的解决方案 error: Microsoft ...

  4. Windows vc++运行库安装,Microsoft Visual C++ Build Tools官方工具

    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools&quo ...

  5. Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools解决方案

    Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools解决方案 参考文章: ...

  6. error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools“:解决方案

    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools&quo ...

  7. Microsoft Visual C++Build Tools安装包丢失或损坏【解决方案】

    ​​​​​​​ ​​​​​​​ ​​​​​​​ ​​​​​​​ ​​​​​​​ ​​​​​​​ ​​​​​​​ 我在网上下载的一个3M左右的安装包,安装过程中提示"安装包丢失或损坏" ...

  8. Scrapy安装错误: error: Microsoft Visual C++ 14.0 is required. Get it with Microsoft Visual C++ Build To

    转载自: https://blog.csdn.net/nima1994/article/details/74931621 原文简练,记得给原文点个赞.写的挺好的! 我写的就比较详细了点~好吧,是琐碎. ...

  9. error: Microsoft Visual C++ 14.0 is required. Get it with Microsoft Visual C++ Build安装scrapy出错解决方法

    安装scrapy出现如下错误: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ ...

最新文章

  1. 用集合java字符串第一个单词_Java小程序 输入一个字符串,将每一个单词首字母大写...
  2. 说说成为顶级运营人员的一个先决条件:做事的霸气!
  3. 用redis实现消息队列
  4. 卡尔曼滤波器(Kalman Filter) 理解
  5. VS也可以这样进行快捷安装
  6. centos系统云服务器,Centos系统怎么进云服务器
  7. 平滑空间滤波器(附C语言实现代码)
  8. asp sql 导出 excel_使用SQL进行数据分析(八)
  9. JSON 解析之 FastJson
  10. 小程序 ---- (自定义头部导航)
  11. 中国的网站能活几天?
  12. eWebEditor编辑HTML,eWebEditor编辑器免费版
  13. J.A.R.V.I.S.
  14. 第一天 渗透的基本概念
  15. 互联网黑市分析:社工库的传说
  16. ISP(二) Demosiac 去马赛克 (CIP)
  17. MongoDB全面总结
  18. 在线重定义在线更换分区表分区类型
  19. 计算机类分流论文,储蓄存款分流结构论文
  20. 《吐血整理》保姆级系列教程-玩转Fiddler抓包教程(2)-初识Fiddler让你理性认识一下

热门文章

  1. 最近很火的百度MIP之 zblog改造
  2. Mysql基本用法-01
  3. WPF-003 popup实现下拉列表的问题
  4. 怎么注销midas服务器程序,MIDAS的服务器镜像技术
  5. centos 7.2 mysql 允许_CentOS 7.2 mysql-5.7.17 审计插件安装、开启与设定
  6. java exe jdk_javac.exe 和java.exe两个可执行程序放在JDK安装目录的( )目录下。_学小易找答案...
  7. 阻尼衰减曲线用python_高阻尼隔震橡胶支座结构及防震效果
  8. linux树形目录结构存放,Linux目录结构
  9. java引用传递106_(转载)java的值传递与引用传递
  10. 【软件设计师】2020-08-08