Default native-compiler executable ‘cl.exe‘ not found via environment variable PATH

编程入门 行业动态 更新时间:2024-10-28 19:28:34

 native-image打包为本地镜像时候出错

PS C:\Users\cc\Desktop\java> native-image Example
[example:7472]    classlist:   1,642.36 ms,  0.96 GB
[example:7472]        setup:     586.88 ms,  0.96 GB
Error: Default native-compiler executable 'cl.exe' not found via environment variable PATH
Error: To prevent native-toolchain checking provide command-line option -H:-CheckToolchain
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Error: Image build request failed with exit status 1
PS C:\Users\cc\Desktop\java> a

安装Visual Studio

选择单个组件

INCLUDE=C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\shared;D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\include.;
LIB=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\um\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\ucrt\x64;D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\lib\x64;

在PATH中添加:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64

更多推荐

Default native-compiler executable ‘cl.exe‘ not found via environment variable P

本文发布于:2023-06-10 19:02:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/645353.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:compiler   executable   Default   native   cl

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!