日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程语言 > c/c++ >内容正文

c/c++

visual c++ build tools的安装与使用

發(fā)布時間:2023/12/15 c/c++ 49 豆豆
生活随笔 收集整理的這篇文章主要介紹了 visual c++ build tools的安装与使用 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

開發(fā)環(huán)境:

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下開發(fā)應(yīng)用或庫時,如果不想安裝完整的visual studio,可以選擇只安裝build tools在命令行下進(jìn)行編譯等操作。這樣可以節(jié)省硬盤空間,實測占用7GB,并且裝在了C盤。

?

1. 下載安裝

打開鏈接下載安裝程序:?Microsoft Visual C++ Build Tools 2015,雙擊visualcppbuildtools_full.exe,選擇默認(rèn)即可,點擊安裝,等待10分鐘左右即可完成安裝。

?

2. 準(zhǔn)備代碼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)執(zhí)行:cl hello_world.c

可看到生成兩個文件,分別是hello_world.obj和hello_world.exe

?

4. 測試

執(zhí)行:.\hello_world.exe

或直接雙擊hello_world.exe執(zhí)行。

?

?

總結(jié)

以上是生活随笔為你收集整理的visual c++ build tools的安装与使用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。