I have installed MatConvNet from VLFeat and I am trying to compile it. But as I am trying to run vl_compilenn
it shows the following error:
vl_compilenn
Warning: CL.EXE not found in PATH. Trying to guess out of mex setup.
> In vl_compilenn>check_clpath (line 580)
In vl_compilenn (line 413)
'cl.exe' is not recognized as an internal or external command,
operable program or batch file.
Error using vl_compilenn>check_clpath (line 591)
Unable to find cl.exe
Error in vl_compilenn (line 413)
check_clpath(); % check whether cl.exe in path
install visual studio community edition ( it's the free edition ) (minwg compiler will not work) go to C:\Program Files (x86)\Microsoft Visual Studio search for cl.exe take the one appropriate for your computer architecture and copy it to the folder containing the matconvnet installation run mex -setup c++ and set it to visual studio and you're good to go
I have added the directory with cl.exe
to my system PATH variable (you need to restart Matlab after that operation) and the compilation succeeded. The check_clpath()
function was unable to find proper location of cl.exe
, because it was trying to find executable in directory which does not exsist:
cl_path =
'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\bin\amd64'
after adding the cl.exe
dir to PATH variable, in my case:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64
the compilation succeeded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With