I need to setup my mex command to find the correct fortran compiler

3 次查看(过去 30 天)
I'm trying to duplicate the matlab example of compiling fortran code using mex command: >> mex -R2018a timestwoCL.F.
I get the following error:
Error using mex
No supported compiler was found. For options, visit https://www.mathworks.com/support/compilers.
I'm a 2019 visual studio user and my compiler is supported per the above link (Intel 2020 parallel studio) and is located at C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020\windows\bin\intel64\ifort.exe.
How do I set my mex command to use this compiler?
configuration info:
MATLAB Version: 9.6.0.1072779 (R2019a)
MATLAB License Number: 41042005
Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 19042)
Java Version: Java 1.8.0_181-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  3 个评论
dpb
dpb 2022-7-12
I'd forgotten just what TMW had done to the setup script stuff -- I recalled <omment_585625> almost two years ago now that were looking into trying to figure out the setup to be able to use gfortran -- and the setup files are now XML.
That TMW makes all of this as opaque and obtuse as possible is just infuriating -- they should just provide the needed compiler and link options required to build a mex object file and let the user choose the compiler of choice and build it with the toolset of choice.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Write C Functions Callable from MATLAB (MEX Files) 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by