Hello,
It seems a classical problem:
>> mex -setup
MEX configured to use 'Microsoft Visual C++ 2019 (C)' for C language compilation.
To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN
>> mex -setup FORTRAN
Error using mex
Supported compiler not detected. For options, visit https://www.mathworks.com/support/compilers.
I have installed Intel oneAPI 2023 for Fortran and Microsoft Visual Studio 2019. During the installation a msg from Intel tells me that Desktop development with C++ was missing. Conseqently I have added this component using the Visual Studio Installer as explained.
here is my matlab installation
MATLAB Version: 9.14.0.2206163 (R2023a)
MATLAB License Number: STUDENT
Operating System: Microsoft Windows 10 Professionnel pour les Stations de travail Version 10.0 (Build 19044)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Many thanks for your help

댓글 수: 2

jian wang
jian wang 2023년 5월 8일
Hi, Alain,
I have the same problem. Have you solved it?
Best wishes
Jian
Alain Barraud
Alain Barraud 2023년 5월 8일
Not yet !! If a solution is found I'll post it here
best regards
Alain

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

답변 (1개)

Keshav
Keshav 2023년 4월 13일

0 개 추천

Hi Alain,
I understand that you are getting an error “Error using mex: Supported compiler not detected” while using the command “mex -setup FORTRAN” and you have already installed Intel oneAPI 2023 for Fortran and Microsoft Visual Studio 2019.
Try to run the below command in the MATLAB command window.
mex -v -setup fortran
This command will give you the proper reason behind the compiler not found error. From there you can do the needful.

댓글 수: 5

Alain Barraud
Alain Barraud 2023년 4월 15일
thanks for your answer.
Matalb tries to find one fortran compatible compiler among alll the possible configuration and ends with:
Did not find installed compiler 'Intel oneAPI 2022 for Fortran with Microsoft Visual Studio 2022'.
... Looking for compiler 'Intel oneAPI 2023 for Fortran with Microsoft Visual Studio 2019' ...
... Looking for environment variable 'IFORT_COMPILER23' ...No.
Did not find installed compiler 'Intel oneAPI 2023 for Fortran with Microsoft Visual Studio 2019'.
... Looking for compiler 'Intel oneAPI 2023 for Fortran with Microsoft Visual Studio 2022' ...
... Looking for environment variable 'IFORT_COMPILER23' ...No.
I have not be asked for any license key during installation. Is thisthe problem?
Best regards
Alain Barraud
Alain Barraud 2023년 4월 15일
the installed version is "Visual Studio Community 2019 (version 16.11)"
Alain Barraud
Alain Barraud 2023년 4월 15일
it seems that a previous comment has disappeared
the verbose mode ends with
Did not find installed compiler 'Intel oneAPI 2022 for Fortran with Microsoft Visual Studio 2022'.
... Looking for compiler 'Intel oneAPI 2023 for Fortran with Microsoft Visual Studio 2019' ...
... Looking for environment variable 'IFORT_COMPILER23' ...No.
Did not find installed compiler 'Intel oneAPI 2023 for Fortran with Microsoft Visual Studio 2019'.
... Looking for compiler 'Intel oneAPI 2023 for Fortran with Microsoft Visual Studio 2022' ...
... Looking for environment variable 'IFORT_COMPILER23' ...No.
Did not find installed compiler 'Intel oneAPI 2023 for Fortran with Microsoft Visual Studio 2022'.
Walter Roberson
Walter Roberson 2023년 4월 15일
I suggest reinstalling the Fortran component, then exit matlab and re-enter matlab and try again
Alain Barraud
Alain Barraud 2023년 4월 17일
Nothing new. I am even restart my computer.
Matlab knows that Fortran is installed except it says "is not detected"!!??

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

카테고리

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

제품

릴리스

R2023a

질문:

2023년 4월 10일

댓글:

2023년 5월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by