Why can't nvcc find my Visual C++ installation?

眉间皱痕 提交于 2019-11-28 10:35:09

It looks like you didn't install Visual Studio 2005 or 2008, but your compiler version number indicates it is MSVC 9.0. The simplest way to get everything working is to install Visual Studiso and I believe Express will work.

Also, you might want to take a look at this topic on Nvidia Forum

Include this line

compiler-bindir = C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin

in

C:\CUDA\bin64\nvcc.profile

With CUDA v6.0, having an older version of Visual Studio (I'm using 2010) is still required, but the other solutions did not work for me.

To make this work, add the following to your nvcc.profile (C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v6.0/bin/nvcc.profile):

CUDA_NVCC_FLAGS += --compiler-bindir = "-IE:/PROGRA~2/MICROS~2.0/VC/bin"

I also have VS 2013 installed, and I needed this argument to prevent nvcc from finding the newer (sadly incompatible) version of cl.exe

Vortex

I was trying to get CUDA 6.5 working with VS 2010 express. After uninstalling VS 2010 express, installing Windows SDK 7.1 and reinstalling VS 2010 express, setting Windows SDK 7.1 as tool set, etc. Nothing worked. In the end what worked for me was to add the following to CUDA_NVCC_FLAGS:

--cl-version 2010

You may also need to add:

--machine 32

I tried the appropriate flags in the command line first.

This link was very helpful

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!