gpt4 book ai didi

c++ - nvcc 致命 : Visual Studio configuration file 'vsvars32.bat' could not be found (VS 2017)

转载 作者:行者123 更新时间:2023-11-30 04:51:25 26 4
gpt4 key购买 nike

我正在尝试在 Visual Studio 2017 中构建一个 cuda/c++ 程序。可能值得注意的是,我的计算机还安装了 VS 2013。我尝试将 vsvars32.bat 放在与 VS 2013 相同的目录中,但错误没有改变。我不知道它应该去哪里,因为 x64/../../..

>------ Build started: Project: CMakeLists, Configuration: Debug ------
[1/5] cmd.exe /C "cd /D "D:\Users\adm_lab\CMakeBuilds\3f75e69e-932c-9435-a942-a027b1514a1d\build\x64-Debug (default)\CMakeFiles\voxelizer.dir" && "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory "D:/Users/adm_lab/CMakeBuilds/3f75e69e-932c-9435-a942-a027b1514a1d/build/x64-Debug (default)/CMakeFiles/voxelizer.dir//." && "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -D verbose:BOOL=OFF -D build_configuration:STRING=Debug -D "generated_file:STRING=D:/Users/adm_lab/CMakeBuilds/3f75e69e-932c-9435-a942-a027b1514a1d/build/x64-Debug (default)/CMakeFiles/voxelizer.dir//./voxelizer_generated_main.cu.obj" -D "generated_cubin_file:STRING=D:/Users/adm_lab/CMakeBuilds/3f75e69e-932c-9435-a942-a027b1514a1d/build/x64-Debug (default)/CMakeFiles/voxelizer.dir//./voxelizer_generated_main.cu.obj.cubin.txt" -P "D:/Users/adm_lab/CMakeBuilds/3f75e69e-932c-9435-a942-a027b1514a1d/build/x64-Debug (default)/CMakeFiles/voxelizer.dir//voxelizer_generated_main.cu.obj.Debug.cmake""
FAILED: CMakeFiles/voxelizer.dir/voxelizer_generated_main.cu.obj
cmd.exe /C "cd /D "D:\Users\adm_lab\CMakeBuilds\3f75e69e-932c-9435-a942-a027b1514a1d\build\x64-Debug (default)\CMakeFiles\voxelizer.dir" && "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory "D:/Users/adm_lab/CMakeBuilds/3f75e69e-932c-9435-a942-a027b1514a1d/build/x64-Debug (default)/CMakeFiles/voxelizer.dir//." && "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -D verbose:BOOL=OFF -D build_configuration:STRING=Debug -D "generated_file:STRING=D:/Users/adm_lab/CMakeBuilds/3f75e69e-932c-9435-a942-a027b1514a1d/build/x64-Debug (default)/CMakeFiles/voxelizer.dir//./voxelizer_generated_main.cu.obj" -D "generated_cubin_file:STRING=D:/Users/adm_lab/CMakeBuilds/3f75e69e-932c-9435-a942-a027b1514a1d/build/x64-Debug (default)/CMakeFiles/voxelizer.dir//./voxelizer_generated_main.cu.obj.cubin.txt" -P "D:/Users/adm_lab/CMakeBuilds/3f75e69e-932c-9435-a942-a027b1514a1d/build/x64-Debug (default)/CMakeFiles/voxelizer.dir//voxelizer_generated_main.cu.obj.Debug.cmake""
nvcc fatal : Visual Studio configuration file 'vsvars32.bat' could not be found for installation at 'C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/../../..'
CMake Error at voxelizer_generated_main.cu.obj.Debug.cmake:219 (message):
Error generating
D:/Users/adm_lab/CMakeBuilds/3f75e69e-932c-9435-a942-a027b1514a1d/build/x64-Debug
(default)/CMakeFiles/voxelizer.dir//./voxelizer_generated_main.cu.obj


ninja: build stopped: subcommand failed.

Build failed.

编辑:我想我应该补充一点,这台计算机没有互联网连接,所以我使用了概述的本地缓存方法 here安装 VS。

最佳答案

请仔细检查您的 Visual Studio 2017 实例是否是最新的。然后通过 Visual Studio 安装程序修复您的 Visual Studio 实例:

  1. 启动Visual Studio 安装程序
  2. 单击 Visual Studio 2017 安装前的详细信息图标图标,然后单击修复

阅读Microsoft Docs | Repair Visual Studio获取更多信息。

关于c++ - nvcc 致命 : Visual Studio configuration file 'vsvars32.bat' could not be found (VS 2017),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54803129/

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