windows下编译C/C++代码

今天下载了wolfssl的C 源码,想执行python下的测试代码时,需要编译一些代码,提示下载visualcppbuildtools_full.exe,

这是window下编译代码的工具库,下载地址:

https://download.microsoft.com/download/5/f/7/5f7acaeb-8363-451f-9425-68a90f98b238/visualcppbuildtools_full.exe

下载后点击exe文件然后开始默认安装。。。安装好后开始测试:

1.新建一个hello.c文件,保存起来

#include<stdio.h>

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

安装好后打开,开始菜单选择Visual C++ 2015 x86 Native Tools Command Prompt打开命令行。切换到hello.c所在的目录下,执行 cl hello.c

双击hello.exe,成功

猜你喜欢

转载自www.cnblogs.com/wangjian1226/p/11126009.html