Not able to compile Mex file on 2016b

3 views (last 30 days)
Tyler Clark
Tyler Clark on 17 Sep 2016
Answered: fulan liu on 26 Mar 2018
Hello! Thanks for your help!
I am using a windows 64-bit with a trial version.( I own a 2013 version but due to its inability to download windows 64 bit has led to other compiling problems).
In Short: I can't compile this mex file or have MATLAB recognize any other compiler.
% code Trial>> run vl_compilenn.m
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)
In run (line 96)
'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
Error in run (line 96)
evalin('caller', [script ';']);
Also important:
% code
Trial>> mex -setup C
MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the
new API. You can find more information about this at:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
Another important thing is that I have also installed Intel Parallel Studio XE 2017 as another compiler.

Answers (2)

Walter Roberson
Walter Roberson on 18 Sep 2016
After checking that you are using a supported compiler (see http://www.mathworks.com/matlabcentral/answers/303450-supported-compilers-for-2016b-windows-64#answer_235110) you need to
mex -setup C++
vl_compilenn requires a C++ compiler, not just C compiler.
Also it turns out that vl_compilenn is a function. I recommend that instead of
run vl_compilenn.m
that you use
vl_compilenn('verbose', 1)
and if you have difficulty then show us the output.

fulan liu
fulan liu on 26 Mar 2018
hi, I meet the problem as well, do you solve the it?

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!