This project is read-only.

Cannot find compiler 'cl.exe' in PATH

Jan 6, 2016 at 2:31 PM
I am new to so must be doing something rather stupid to get this fault but have been grappling with this problem for days now. I managed to get the Cuda stuff installed from NVIDIA and hope to be able to access it using your well thought of C# wrapper. My problem probably stems from the problem that I am not specifying the PATH correctly or in the proper place. I downloaded CUDA SDK (windows version) and am running WINDOWS 10 with Visual Studio 10. I have an NVIDIA GeForce 930M

My error arises in ArrayBasicIndexing.cs:-

From this file, I include the snippet here:-
public class ArrayBasicIndexing
public const int N = 1 * 1024;

public static void Execute()
    GPGPU gpu = CudafyHost.GetDevice(CudafyModes.Target, 0);
    eArchitecture arch = gpu.GetArchitecture();
    CudafyModule km = CudafyTranslator.Cudafy(arch);
The line:-CudafyModule km = CudafyTranslator.Cudafy(arch); is the one where the following error message is reported: -
Cudafy.CudafyCompileException: Compilation error:
nvcc fatal : Cannot find compiler 'cl.exe' in PATH

Please add the Visual Studio VC bin directory to PATH in Environment Variables..
at Cudafy.CudafyModule.Compile(CompileProperties[] props)
at Cudafy.Translator.CudafyTranslator.Cudafy(IEnumerable`1 props, Type[] types)
at Cudafy.Translator.CudafyTranslator.Cudafy(CompileProperties prop, Type[] types)
at Cudafy.Translator.CudafyTranslator.Cudafy(ePlatform platform, eArchitecture arch, Version cudaVersion, Boolean compile, Type[] types)
at Cudafy.Translator.CudafyTranslator.Cudafy(ePlatform platform, eArchitecture arch, Type[] types)
at Cudafy.Translator.CudafyTranslator.Cudafy(eArchitecture arch)
at CudafyExamples.Arrays.ArrayBasicIndexing.Execute() in C:\temp\CudafyV1.29\CudafyV1.29\CudafyExamples\Arrays\ArrayBasicIndexing.cs:line 39
at CudafyExamples.Program.Main(String[] args) in C:\temp\CudafyV1.29\CudafyV1.29\CudafyExamples\Program.cs:line 46.CudafyCompileException: Compilation error:
nvcc fatal : Cannot find compiler 'cl.exe' in PATH

I tried to follow the advice given here about setting up a path to where Visual Studio bin directory was situated. I navigate to the System (advanced system settings/Environment Variables) and set the PATH variable equal to C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC (my local VC subdirectory. This has no affect on the outcome. I still get this error no matter what I try. I would be most grateful if someone could direct me to solve this issue.
Many thanks
Jan 8, 2016 at 10:35 AM
maybe you need a reboot

make sure you added a reference to PATH correctly by opening a command prompt and trying to run cl.exe