Bazel在升级Visual Studio后不再起作用

问题描述 投票:0回答:1

我最近在系统上升级了Visual Studio,bazel build ...不再起作用。例如,

C:\Users\marki\plasty>bazel build labeling:semantic_seg
INFO: Analyzed target //labeling:semantic_seg (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: C:/users/marki/plasty/util/BUILD:59:1: C++ compilation of rule '//util:image' failed (Exit -1). Note: Remote connection/protocol failed with: execution failed
Action failed to execute: java.io.IOException: ERROR: src/main/native/windows/process.cc(199): CreateProcessW("C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\bin\HostX64\x64\cl.exe" /nologo /DCOMPILER_MSVC /DNOMINMAX /D_WIN32_WINNT=0x0601 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /bigobj /Zm500 /EHsc /wd4351 /wd4291 /wd4250 /wd4996 /I. /Ibazel-out/x64_windows-fastbuild/bin /Ibazel-out/x64_windows-fastbuild/bin/third_party/stb/_virtual_includes/stb_image /showIncludes /MD /Od /Z7 /wd4117 "-D__DATE__=\"redacted\"" "-D__TIMESTAMP__=\"redacted\"" "-D_(...)): The system cannot find the file specified.
 (error: 2)
Target //labeling:semantic_seg failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.438s, Critical Path: 0.02s
INFO: 0 processes.
FAILED: Build did NOT complete successfully

目录C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702在我的系统上不存在(吗?)。但是,我找到了目录C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105。但是我不确定在Bazel中需要更改什么设置才能使其使用新目录。

c++ visual-studio bazel
1个回答
0
投票

找到此线程https://github.com/bazelbuild/bazel/issues/8589之后,我将环境变量BAZEL_VC_FULL_VERSION设置为14.23.28105,这似乎解决了该问题。

© www.soinside.com 2019 - 2024. All rights reserved.