Can I configure a mex compiler on toolbox installation?
I have set of XML mexopts files and helper files that enable the use of the MinGW and Cygwin Fortran compilers on Windows on pre-R2024a releases. I’d like to package these in a toolbox like the compiler support package from Mathworks: https://www.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c-fortran-compiler
On a fresh install of Matlab (i.e. mex not previously set up), installing that toolbox sets up the MinGW compilers. I don’t see a mechanism in the toolbox packaging tool to do this, though, and the only other answers I could find on this question suggest either having a check run the first time the user executes a toolbox function or having the user run a setup function.
Is there a way to do this automatically for user-created toolboxes?I have set of XML mexopts files and helper files that enable the use of the MinGW and Cygwin Fortran compilers on Windows on pre-R2024a releases. I’d like to package these in a toolbox like the compiler support package from Mathworks: https://www.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c-fortran-compiler
On a fresh install of Matlab (i.e. mex not previously set up), installing that toolbox sets up the MinGW compilers. I don’t see a mechanism in the toolbox packaging tool to do this, though, and the only other answers I could find on this question suggest either having a check run the first time the user executes a toolbox function or having the user run a setup function.
Is there a way to do this automatically for user-created toolboxes? I have set of XML mexopts files and helper files that enable the use of the MinGW and Cygwin Fortran compilers on Windows on pre-R2024a releases. I’d like to package these in a toolbox like the compiler support package from Mathworks: https://www.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c-fortran-compiler
On a fresh install of Matlab (i.e. mex not previously set up), installing that toolbox sets up the MinGW compilers. I don’t see a mechanism in the toolbox packaging tool to do this, though, and the only other answers I could find on this question suggest either having a check run the first time the user executes a toolbox function or having the user run a setup function.
Is there a way to do this automatically for user-created toolboxes? toolbox, mex MATLAB Answers — New Questions









