Search code examples
cygwincuda

Help with installing CUDA, cl.exe is not found in PATH


I am using cygwin in Windows 7 and is currently struggling with this:

nvcc fatal   : Cannot find compiler 'cl.exe' in PATH

I tried to google it but it turns out that most people use Visual Studio to debug.. and I insist to just use cygwin and emacs for the debugging purpose, and cygwin gave me that error. Is there any way for me to fix this?

Thank you for any answers!


Solution

  • You need to set up the environment variables for the Visual Studio compiler so that you can use it in your cygwin environment. I do this with a .BAT file on my desktop which sets up the environment and then starts a cygwin shell with everything ready to roll:

    @echo off
    call "C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat"
    chdir C:\cygwin\bin
    bash --login -i