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

后端 未结 4 789
陌清茗
陌清茗 2020-12-10 09:27

I\'m running Windows 7 Pro x64 on a Core i5 with a NVIDIA 3100m, which is CUDA compatible.

I\'ve tried installing both the 32-bit and 64-bit CUDA toolkits from NVIDI

相关标签:
4条回答
  • 2020-12-10 10:01

    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

    0 讨论(0)
  • 2020-12-10 10:10

    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

    0 讨论(0)
  • 2020-12-10 10:13

    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

    0 讨论(0)
  • 2020-12-10 10:16

    Include this line

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

    in

    C:\CUDA\bin64\nvcc.profile

    0 讨论(0)
提交回复
热议问题