MATLAB Answers

How to compile both C and FORTRAN source files in a single call to MEX?

17 views (last 30 days)
leu ryan
leu ryan on 26 Oct 2018
Commented: dpb on 26 Oct 2018
Hi, i need to compile both C and FORTRAN source files in a single call to MEX. My command is "mex -f ./mexopts.sh -v -O -output mexsepeli mexgateway_sepeli.c sepeli.F". But Matlab cannot run ans shows that "Cannot compile both C and FORTRAN source files in a single call to MEX." Would you mind telling me What i can do to come over this problem? Sincerely, Liu Ran

  1 Comment

dpb
dpb on 26 Oct 2018
mex isn't that smart, unfortunately (I'll refrain from adding what I think of how it's been implemented in polite company).
You've got to go at it in two steps, fortunately, James, the chief resident guru outlined the process at Compiling C and Fortran

Sign in to comment.

Answers (0)

Sign in to answer this question.

Tags