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

1 view (last 30 days)
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)

Categories

Find more on Fortran with MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!