NVlabs / instant-ngp

Instant neural graphics primitives: lightning fast NeRF and more
https://nvlabs.github.io/instant-ngp
Other
15.95k stars 1.92k forks source link

: Could not set up the environment for Microsoft Visual Studio using 'C:/Program Files (x86)/Microsoft V isual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/../../../../../../../VC/Auxiliary/Build/vcvars6 4.bat' #709

Open SHPEYOLO opened 2 years ago

SHPEYOLO commented 2 years ago

I have a problem. I want to know the solution.

nvcc fatal : Could not set up the environment for Microsoft Visual Studio using 'C:/Program Files (x86)/Microsoft V isual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/../../../../../../../VC/Auxiliary/Build/vcvars6 4.bat' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.6.t argets(879,9): error MSB3721: 命令“"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin\nvcc.exe" -dlink -o ngp. dir\RelWithDebInfo\ngp.device-link.obj -Xcompiler "/EHsc /W1 /nologo /O2 /FdF:\Tutorial\ngp\instant-ngp\build\RelWithDe bInfo\ngp.pdb /Zi /MD /GR" -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin/crt" -L"C:\Program Files\NV IDIA GPU Computing Toolkit\CUDA\v11.6\lib\x64" opengl32.lib dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\conte xt.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\init.obj dependencies\glfw\src\glfw_objects.dir\RelWithDeb Info\input.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\monitor.obj dependencies\glfw\src\glfw_objects.dir \RelWithDebInfo\vulkan.obj dependencies\glfw\src\glfwobjects.dir\RelWithDebInfo\window.obj dependencies\glfw\src\glfw objects.dir\RelWithDebInfo\win32_init.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\win32_joystick.obj depe ndencies\glfw\src\glfw_objects.dir\RelWithDebInfo\win32_monitor.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebIn fo\win32_time.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\win32_thread.obj dependencies\glfw\src\glfw_obj ects.dir\RelWithDebInfo\win32_window.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\wgl_context.obj dependen cies\glfw\src\glfw_objects.dir\RelWithDebInfo\egl_context.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\osm esa_context.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\glfw.res "dependencies\tiny-cuda-nn\src\RelWithDe bInfo\tiny-cuda-nn.lib" cuda.lib cublas.lib cudadevrt.lib cudart.lib kernel32.lib user32.lib gdi32.lib winspool.lib com dlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -forward-unknown-to-host-com piler -Wno-deprecated-gpu-targets -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --mach ine 64 ngp.dir\RelWithDebInfo\camera_path.obj ngp.dir\RelWithDebInfo\commondevice.obj ngp.dir\RelWithDebInfo\marching cubes.obj ngp.dir\RelWithDebInfo\nerf_loader.obj ngp.dir\RelWithDebInfo\render_buffer.obj ngp.dir\RelWithDebInfo\testbe d.obj ngp.dir\RelWithDebInfo\testbed_image.obj ngp.dir\RelWithDebInfo\testbed_nerf.obj ngp.dir\RelWithDebInfo\testbed_s df.obj ngp.dir\RelWithDebInfo\testbed_volume.obj ngp.dir\RelWithDebInfo\tinyexr_wrapper.obj ngp.dir\RelWithDebInfo\tria ngle_bvh.obj”已退出,返回代码为 1。 [F:\Tutorial\ngp\instant-ngp\build\ngp.vcxproj]

hanbinbin-web commented 1 year ago

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build 找到相应的文件,用记事本打开vcvarsall.bat,复制其中的代码到vcvars64.bat,将vcvars64.bat中的内容取代就可以了。

tashfeen51 commented 1 year ago

I have the same issue can anyone provide the answer? nvcc fatal : Could not set up the environment for Microsoft Visual Studio using 'C:/Program Files (x86)/Microsoft V isual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/../../../../../../../VC/Auxiliary/Build/vcvars6 4.bat' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 12.2.t argets(908,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin\nvcc.exe" -dli nk -o ngp.dir\RelWithDebInfo\ngp.device-link.obj -Xcompiler "/EHsc /W1 /nologo /O2 /Zi /MD /GR" -Xcompiler "/FdC:\ngp \instant-ngp\build\RelWithDebInfo\ngp.pdb" -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin/crt" -L"C:\P rogram Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\lib\x64" "dependencies\OpenXR-SDK\src\loader\RelWithDebInfo\openxr _loader.lib" opengl32.lib dependencies\glfw\src\glfwobjects.dir\RelWithDebInfo\context.obj dependencies\glfw\src\glfw objects.dir\RelWithDebInfo\init.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\input.obj dependencies\glfw\s rc\glfw_objects.dir\RelWithDebInfo\monitor.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\vulkan.obj depende ncies\glfw\src\glfw_objects.dir\RelWithDebInfo\window.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\win32_i nit.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\win32_joystick.obj dependencies\glfw\src\glfw_objects.dir \RelWithDebInfo\win32_monitor.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\win32_time.obj dependencies\glf w\src\glfw_objects.dir\RelWithDebInfo\win32_thread.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\win32_wind ow.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\wgl_context.obj dependencies\glfw\src\glfw_objects.dir\Rel WithDebInfo\egl_context.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\osmesa_context.obj dependencies\glfw\ src\glfw_objects.dir\RelWithDebInfo\glfw.res dependencies\zlib\RelWithDebInfo\zlibstatic.lib "dependencies\tiny-cuda-nn \RelWithDebInfo\tiny-cuda-nn.lib" advapi32.lib cuda.lib "dependencies\tiny-cuda-nn\dependencies\fmt\RelWithDebInfo\fmt. lib" cudadevrt.lib cudart.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib shell32.lib ole32.lib oleaut3 2.lib uuid.lib odbc32.lib odbccp32.lib -forward-unknown-to-host-compiler -Wno-deprecated-gpu-targets -gencode=arch=com pute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 ngp.dir\RelWithDebInfo\openxr_hmd.obj ngp.dir\RelWithDebI nfo\camera_path.obj ngp.dir\RelWithDebInfo\common_host.obj ngp.dir\RelWithDebInfo\marching_cubes.obj ngp.dir\RelWithDeb Info\nerf_loader.obj ngp.dir\RelWithDebInfo\render_buffer.obj ngp.dir\RelWithDebInfo\testbed.obj ngp.dir\RelWithDebInfo \testbed_image.obj ngp.dir\RelWithDebInfo\testbed_nerf.obj ngp.dir\RelWithDebInfo\testbed_sdf.obj ngp.dir\RelWithDebInf o\testbed_volume.obj ngp.dir\RelWithDebInfo\tinyexr_wrapper.obj ngp.dir\RelWithDebInfo\tinyobj_loader_wrapper.obj ngp.d ir\RelWithDebInfo\triangle_bvh.obj" exited with code 1. [C:\ngp\instant-ngp\build\ngp.vcxproj]