'cl.exe' is not recognized as an internal or external command,

35 ビュー (過去 30 日間)
sana3 sal
sana3 sal 2018 年 5 月 21 日
コメント済み: Waqar Khan 2020 年 5 月 5 日
Hello there,
Did anyone work with vlfeat library used in this tutorial : https://github.com/veda…/practical-object-category-detection ?
I passed to the step mentioned in the documentation
% Step 1.4: Apply the model to a test image
% -------------------------------------------------------------------------
im = imread('data/signs-sample-image.jpg') ;
im = im2single(im) ;
hog = vl_hog(im, hogCellSize) ;
scores = vl_nnconv(hog, w, []) ;
here the vl_nnconv(hog, w, []) ; function was having some error in its implementation, it was just a file that call another function called "vl_nnnotfound(mfilename);" and it has no arguments or any return value! but the function call has 3 arguments! so i altered the function to be as the attached file.
and it passed! but when calling the vl_nnnotfound function it return an error regarding the compiler of mingw-w64 with this error message:
'cl.exe' is not recognized as an internal or external command,
operable program or batch file.
Error using vl_compilenn>check_clpath (line 656)
Unable to find cl.exe
Error in vl_compilenn (line 426)
cl_path = fileparts(check_clpath()); % check whether cl.exe in path
I download the mingw-w64 compiler as a third party from the ads-on (matlab 2017b) and i find this compiler "TDM-GCC-64" but the same problem exists!!
Do I still have some error regarding its files and compilation with mingw-w64 compiler! they mentioned here : https://stackoverflow.com/questions/40226354/matconvnet-error-cl-exe-not-found
that i can use the Visual studio to use the cl.exe file in the path for comilation,
Does it work if i compiled it with visual studio?
NEED for HELP PLEASE!

回答 (3 件)

Mohamed aymane Zizi
Mohamed aymane Zizi 2020 年 1 月 19 日
The solution I figured out is hardcoding the path link.
in vl_compilenn.m file you find the line
cl_path = fullfile(cc.Location, 'VC', 'bin', 'amd64');
so basically you changed accordinally to where cl.exe is located, in my case I changed it to this.
cl_path = 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64';
and worked perfectly!
wish that helps you!
  2 件のコメント
Sneha Suhitha Galiveeti
Sneha Suhitha Galiveeti 2020 年 3 月 1 日
yes, that worked !! Thank you
Waqar Khan
Waqar Khan 2020 年 5 月 5 日
Thats work thank you dear

サインインしてコメントする。


Jan
Jan 2018 年 5 月 21 日
編集済み: Jan 2018 年 5 月 21 日
vlfeat does not support the MinGW compiler. According to the List of supported compilers for Matlab R2017b you need either a professional version of MSVC 2012, 2013 or 2015, or the community version of MSVC 2017.
See also: https://www.mathworks.com/matlabcentral/answers/331523-unable-to-find-cl-exe-executing-vl_compilenn . Note that searching in the forum is useful in many cases.
  2 件のコメント
sana3 sal
sana3 sal 2018 年 5 月 21 日
I have installed the community version of visual studio 2017, but still have the same error! after installing, what i have to do?
Jan
Jan 2018 年 5 月 22 日
I suggest to ask the authors for help.

サインインしてコメントする。


Walter Roberson
Walter Roberson 2018 年 5 月 21 日
cl.exe not found usually means that you are trying to use a Visual Studio Express edition on a MATLAB version that needs the Professional edition.
  2 件のコメント
sana3 sal
sana3 sal 2018 年 5 月 21 日
i have installed the community version! does it matter?
Walter Roberson
Walter Roberson 2020 年 3 月 1 日
Yes in your release it does matter.

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by