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

Hi All,

I am trying to create m file from cuda files name Szeta.cu(It is given in Matlab_CUDA_1.1 Folder),but I find the following error:

nvmex -f nvmexopts.bat Szeta.cu -IC:\cuda\include -LC:\cuda\lib

nvcc fatal : Cannot find compiler ‘cl.exe’ in PATH

C:\PROGRA~1\MATLAB71\BIN\NVMEX.PL: Error: Compile of ‘Szeta.cu’ failed.

??? Error using ==> nvmex

Unable to complete successfully.

Details of my system

Window 7 ultimate

Matlab Version:7.1.0.246 (R14) Service Pack 3

Visual Studio 2008

CudaToolkit :cudatoolkit_2.3_win_32

Cuda Sdk:cudasdk_2.3_win_32

Following are the configuration of my nvmexopts.bat File:

set MATLAB=%MATLAB%

set VS80COMNTOOLS=%VS80COMNTOOLS%

set VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0

set VCINSTALLDIR=%VSINSTALLDIR%\VC

set

PATH=%VCINSTALLDIR%\BIN;%VCINSTALLDIR%\PlatformSDK\bin;%VSINSTALLDIR%\Common7\IDE;%VSINS

TALLDIR%\SDK\v2.0\bin;%VSINSTALLDIR%\Common7\Tools;%VSINSTALLDIR%\Common7\Tools\bin;%VCIN

STALLDIR%\VCPackages;%MATLAB_BIN%;C:\Program Files\Microsoft

SDKs\Windows\v6.0A\bin;%PATH%

set

INCLUDE=%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\PlatformSDK\I

NCLUDE;%VSINSTALLDIR%\SDK\v2.0\include;%INCLUDE%

set

LIB=%VCINSTALLDIR%\ATLMFC\LIB;%VCINSTALLDIR%\LIB;%VCINSTALLDIR%\PlatformSDK\lib;%VSINSTAL

LDIR%\SDK\v2.0\lib;%MATLAB%\extern\lib\win32;%LIB%;C:\Program Files\Microsoft

SDKs\Windows\v6.0A\Lib

Tell how can I remove this error,so that my cuda examples running fine on Matlab.

Thanks in Advance

Are you sure that that you have installed visual studio at
C:\Program Files\Microsoft Visual Studio 9.0 ?

For example I have for starting visual studio batch file

set PATH=%PATH%;D:\Program Files\Microsoft Visual Studio 9.0\VC\bin;F:\Programy32\cuda\bin

“D:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\vcsexpress.exe”

because I have in on other drive.

And if you have 64-bit OS then it can be also on different path.

Thank for reply TrekCZ,yeah I am sure about my visual stdio path.Following is path of visual stdio:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE

Tell me solution of this error.

Thanks in advance

Make sure you do not have space characters at the end of command in batch file.