how to solve the error: You have to run compiler_mex before.

조회 수: 5 (최근 30일)
Amal FH
Amal FH 2020년 11월 18일
답변: Ana Miguelez Martinez 2022년 5월 31일
I'm working on a project where i need to use perform_fast_marching-mesh. However i get this error:
Error using perform_fast_marching_mesh (line 66)
You have to run compiler_mex before.
But when i put mex - setup, it doesn't seem like the mex compiler has a problem, it says:
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. You will be required
to update your code to utilize the new API.
You can find more information about this at:
https://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
To choose a different C compiler, select one from the following:
MinGW64 Compiler (C) mex -setup:'C:\Users\Amal Fh\AppData\Roaming\MathWorks\MATLAB\R2018b\mex_C_win64.xml' C
Microsoft Visual C++ 2017 (C) mex -setup:'C:\Program Files\MATLAB\R2018b\bin\win64\mexopts\msvc2017.xml' C
To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN
I don't understand why i get the first error. Can someone help me please.

답변 (2개)

Walter Roberson
Walter Roberson 2020년 11월 18일
That package needs C++ so you need to
mex -setup C++
  댓글 수: 4
Amal FH
Amal FH 2020년 11월 18일
That's a comment actually, this is the code:
% use fast C-coded version if possible
if exist('perform_front_propagation_2d')~=0
[D,S,Q] = perform_front_propagation_mesh(vertex, faces-1, W,start_points-1,end_points-1, nb_iter_max, H, L, values, dmax);
Q = Q+1;
else
error('You have to run compiler_mex before.');
end
Walter Roberson
Walter Roberson 2020년 11월 18일
You got told
Error using perform_fast_marching_mesh (line 66)
You have to run compiler_mex before.
^^^^^^^^^^^^
That is telling you that before you use the code, you need to (once) give the command
compiler_mex
However, my investigation in the source code shows that instead what you need is to give the command
compile_mex

댓글을 달려면 로그인하십시오.


Ana Miguelez Martinez
Ana Miguelez Martinez 2022년 5월 31일
Hello!
I have the same problem and the same code.
Don't found compile_mex, the answer for the comand is "Unrecognized function or variable 'compile_mex'.
Thanks!!

태그

Community Treasure Hunt

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

Start Hunting!

Translated by