Error when using vl_compilenn: cannot found cl.exe in path
Mostrar comentarios más antiguos
I got errors when running vl_compilenn as follows:
>> vl_compilenn
Warning: CL.EXE not found in PATH. Trying to guess out of mex setup.
> In vl_compilenn>check_clpath (line 566) In vl_compilenn (line 400) 'cl.exe' is not recognized as an internal or external command, operable program or batch file. Error using vl_compilenn>check_clpath (line 577) Unable to find cl.exe
Error in vl_compilenn (line 400) check_clpath(); % check whether cl.exe in path
I use MATLAB2015b on Windows 10, Microsoft Visual C++ 2013 Professional (C) for C language compilation, and Visual Studio 2013.
Also, I tried to set the Path and Environment Variables for Command-Line Builds as following command: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC>vcvarsall x86_amd64 on the VS2012 x64 Cross Tools Command Prompt.
But, it cannot fix my problem. Could you please give me solution for this error.
Thank you for your help.
3 comentarios
Tandang Yuliadi Dwi Putra
el 11 de Ag. de 2016
Hi Woranut Iampa I have the same problem with you. Have you succeed to run the vl_compilenn? I use Matlab2016b on Windows 8 and Visual Studio 2015 Community edition
Sascha D. Krauß
el 17 de Feb. de 2017
Same problem here. No solution yet?
Fredrik Zachrisson
el 7 de Abr. de 2017
same here
Respuestas (4)
Major_He
el 9 de Mayo de 2017
5 votos
I have just solved this problem by reading this webpage: http://stackoverflow.com/questions/40226354/matconvnet-error-cl-exe-not-found
I use Matlab R2016b on windows 10, Visual Studio 2017 Community. Visual Studio 2017 works well in my computer when compiling C/C++ programs, and I just add a new path (the folder containing cl.exe in Visual Studio installed path) to computer's Environment Variables. Then, this problem solved.
3 comentarios
Jon Slow
el 22 de Oct. de 2017
Are you using SDK 7.1?
Walter Roberson
el 22 de Oct. de 2017
Jon Slow: No, Major_He was using Visual Studio 2017 Community.
Note: to use VS 2017 with MATLAB R2016b or R2017a you need to install a patch.
Andrew Mao
el 26 de Sept. de 2018
Editada: Walter Roberson
el 26 de Sept. de 2018
Thank you so much! This has been terribly frustrating. If anyone happens to get a different error after this, go here and follow the most liked response: https://github.com/vlfeat/matconvnet/issues/501
Shaode Yu
el 12 de Abr. de 2019
2 votos
% (1) Unable to find cl.exe
% (a) Adding the directory with cl.exe to the system PATH variable
% (b) Restart MATLAB
% (c) Compile (1) mex -setup C++ (2) vl_compilenn
% Reason: The check_clpath() needs to know the proper location cl.exe
2 comentarios
Walter Roberson
el 12 de Abr. de 2019
That code is expecting a Visual Studios compiler, and would not work with MinGW or lcc.
Shaode Yu
el 12 de Abr. de 2019
Right.
It requires Visual Studio compiler. In particular, MatConvNet requires Visual Studio 2015 and later. It is a prerequisite.
In addition, install the software Everything (https://www.voidtools.com/downloads/) and you can find all files on your computer.
Enjoy.
Walter Roberson
el 9 de Mayo de 2017
0 votos
Typically this error occurs when you have a Community edition or Express edition of Visual Studio installed but your MATLAB version only expects the corresponding Professional version.
1 comentario
Jon Slow
el 22 de Oct. de 2017
So what do I do? get a professional trial?
Ayshath Afra
el 10 de Mzo. de 2020
0 votos
Error in vl_compilenn (line 417)
cl_path = fileparts(check_clpath()); % check whether cl.exe in path
anyone pls help to solve this error in matlab
this error is showing while compiling matconvnet.
7 comentarios
Walter Roberson
el 10 de Mzo. de 2020
Which version of MATLAB are you using, and exactly which compiler do you have installed?
Ayshath Afra
el 10 de Mzo. de 2020
i am using R2018a and the compiler is MinGW64 Compiler
Walter Roberson
el 10 de Mzo. de 2020
As described in the previous solutions, vl_compilenn is hard-coded to require Visual Studios.
R2018a supports Visual Studios 2017 Community Edition (I do not recall if you need a patch for that or not.)
Ayshath Afra
el 11 de Mzo. de 2020
i couldn't replace my error.
Walter Roberson
el 11 de Mzo. de 2020
Which compiler did you install? And did you do
mex -setup C++
to configure the compiler after you installed it?
Ayshath Afra
el 11 de Mzo. de 2020
Compiler is MinGW64
& the warning is : The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. You will be required to update your code to utilize the new API.
Walter Roberson
el 11 de Mzo. de 2020
It will never be possible to compile that program with MinGW. You should give up trying.
Either install Visual Studios 2017 Community Edition, or else give up on using the software.
Categorías
Más información sobre MATLAB Support for MinGW-w64 C/C++ Compiler en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!