# Could not find the compiler "nvcc" on the DOS path. Problem with nvmex

**URL:** <https://forums.developer.nvidia.com/t/could-not-find-the-compiler-nvcc-on-the-dos-path-problem-with-nvmex/16641>\
**Category:** CUDA Programming and Performance\
**Created:** [May 15, 2010, 11:29am UTC](https://forums.developer.nvidia.com/t/could-not-find-the-compiler-nvcc-on-the-dos-path-problem-with-nvmex/16641 "2010-05-15T11:29:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sonia](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Sonia](https://forums.developer.nvidia.com/u/Sonia)\
**Post date:** [May 15, 2010, 11:29am UTC](https://forums.developer.nvidia.com/t/could-not-find-the-compiler-nvcc-on-the-dos-path-problem-with-nvmex/16641/1 "2010-05-15T11:29:40Z")

</div>

Hi all  
I am newbie in Matlab.I am trying to make M file from CUDA programs given in Matlab\_CUDA plug ins.All instruction are given in read file is Working fine,when i try to run nvmex -f nvmexopts.bat Szeta.cu -IC:\cuda\include -LC:\cuda\lib -lcufft -lcudart  
It gives following error:  
This is mex, Copyright 1984-2005 The MathWorks, Inc.

## → Options file specified on command line

## → Options file = nvmexopts.bat MATLAB = C:\PROGRA~1\MATLAB\R2007b → COMPILER = nvcc → Compiler flags: COMPFLAGS = -c -D\_WCHAR\_T\_DEFINED -Xcompiler “/c /Zp8 /GR /W3 /EHsc- /Zc:wchar\_t- /DMATLAB\_MEX\_FILE /nologo” OPTIMFLAGS = -D\_WCHAR\_T\_DEFINED -Xcompiler “/MD /O2 /Oy- /DNDEBUG” DEBUGFLAGS = -D\_WCHAR\_T\_DEFINED -Xcompiler “/MD /Zi /Fd"Szeta.mexw32.pdb” arguments = -IC:\cuda\include Name switch = -o → Pre-linking commands = → LINKER = link → Link directives: LINKFLAGS = /dll /export:mexFunction /MAP /LIBPATH:“C:\PROGRA~1\MATLAB\R2007b\extern\lib\win32\microsoft” libmx.lib libmex.lib libmat.lib /implib:C:\DOCUME~1\hhhh\LOCALS~1\Temp\mex\_DB1ADF77-371A-473B-2B9D-BDE13C4996D8\templib.x /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib LINKDEBUGFLAGS = /DEBUG /PDB:“Szeta.mexw32.pdb” LINKFLAGSPOST = Name directive = /out:“Szeta.mexw32” File link directive = Lib. link directive = Rsp file indicator = @ → Resource Compiler = rc /fo “mexversion.res” → Resource Linker =

Could not find the compiler “nvcc” on the DOS path.  
Use mex -setup to configure your environment properly.

C:\PROGRA~1\MATLAB\R2007B\BIN\NVMEX.PL: Error: Unable to locate compiler.

??? Error using ==\> nvmex at 206  
Unable to complete successfully.  
Please suggest me the solution of this problem.  
Is it a problem with nvcc path?  
Is an change require in nvmexopts.bat or nvmex.pl?  
Following are Detail of my tools:  
1.CUDA Toolkit2.3  
2.CUDA Sdk2.3  
3.Matlab\_CUDA plug ins 1.1  
4.Visual Stdio 2005 or 2008(But now I am using 2005 for Matlab)  
5.Window Service Pack 3  
6. Matlab Version 7.5.0(R2007b)  
Thanks in Advance

---

<div class="post-metadata">

**Author:** ![vigilant](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@vigilant](https://forums.developer.nvidia.com/u/vigilant)\
**Post date:** [June 26, 2010, 1:32pm UTC](https://forums.developer.nvidia.com/t/could-not-find-the-compiler-nvcc-on-the-dos-path-problem-with-nvmex/16641/2 "2010-06-26T13:32:54Z")

</div>

> [@](#):
>
> Hi all
> 
> I am newbie in Matlab.

You are newbie to microsoft OS as well aren’t you? simply add c:\cuda\bin to your search path in system properties-\>advanced-\>enviroment variables-\> %path% variable

good luck
