gpt4 book ai didi

c++ - 升级 Visual Studio 后 Bazel 不再工作

转载 作者:行者123 更新时间:2023-11-30 03:13:50 25 4
gpt4 key购买 nike

我最近升级了系统上的 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 中更改什么设置才能使其使用新目录。

最佳答案

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

关于c++ - 升级 Visual Studio 后 Bazel 不再工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58401067/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com