Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matconvnet error cl.exe not found

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
like image 564
user7029552 Avatar asked Dec 15 '22 02:12

user7029552


2 Answers

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

like image 115
Mohammed Dabbah Avatar answered Dec 21 '22 23:12

Mohammed Dabbah


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.

like image 30
Sylwester Fabian Avatar answered Dec 22 '22 01:12

Sylwester Fabian