Error in building gateway C mex function for calling Fortran subroutine.

2 views (last 30 days)
Hi,
I am using Matlab 2018a with following compilers:
'Microsoft Visual C++ 2017 (C)
Intel Parallel Studio XE 2015 for Fortran with Microsoft Visual Studio 2015.
I am trying to call fortran subroutine in simulink by building a C mex gateway routine.
I am following the instructions from Matlab doumentaion :https://www.mathworks.com/help/simulink/sfg/creating-level-2-fortran-s-functions.html
In the above documentaion, under the sub heading Building Gateway C MEX S-Functions on a Windows System there are instructions to compile the fortran subroutine. However, when I run the command :
mex -v -c toolbox/simulink/simdemos/simfeatures/srcFortran/sfun_atmos_sub.F ...
-f bin/win64/mexopts/intelf12msvs2008opts.bat
I recieve the following error:
Error using mex
C:\Program Files\MATLAB\R2018a\bin\win64\mexopts\intelf12msvs2008opts.bat is not a valid XML file.
Thanks

Answers (0)

Categories

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

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!