Windows配置MSVC环境

发布时间 2023-10-18 22:35:50作者: 漠孤烟

Windows下GraalVM要把jar编译成二进程可执行文件,需要依赖MSVC环境。
Windows下想要MSVC环境但又不想安装笨重的Visual Studio的10几个G容量,可以用以下方法:
1、使用PortableBuildTools来下载MSVC最小集

https://github.com/Data-Oriented-House/PortableBuildTools

2、使用绿色版:

https://www.123pan.com/s/hHzA-lHW4H.html 提取码:wy0k

解压到指定目录,解压目录设置PATH变量VS_BUILDER,然后设置:
PATH:
%VS_BUILDER%\VC\Tools\MSVC\14.37.32822\bin\Hostx64\x64
%VS_BUILDER%\Windows Kits\10\bin\10.0.22621.0\x64
%VS_BUILDER%\Windows Kits\10\bin\10.0.22621.0\x64\ucrt
%VS_BUILDER%\Windows Kits\10\Include\10.0.22621.0\ucrt