Fortran file compilation error.

I am trying to call a Fortran code in simulink by writing S function.
But first I am trying my hands on the Simulink built-in example "sfun_atmos_sub.f", sfun_atmos.c"
Where "sfun_atmos_sub.f" is a computational routine, and "sfun_atmos.c" is a Gateway routine.
When I try to compile "sfun_atmos_sub.f", I get the following error:
Error using mex
LINK : fatal error LNK1104: cannot open file 'ucrt.lib'
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.
What could be the reason for the above error.
Thanks!

댓글 수: 1

Walter Roberson
Walter Roberson 2021년 9월 16일
It should have been installed with your VS C++ 2017.
I suggest you go into the VS C++ installer and ask to install the C tools as well, and specifically download the VS C++ runtime as well.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

제품

릴리스

R2018a

질문:

2021년 9월 16일

댓글:

2021년 9월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by