Documentation Center

  • Trial Software
  • Product Updates

Changing Default Compiler

If you have multiple MATLAB®-supported compilers for a language installed on your system, MATLAB selects one as the default compiler. You can change the default using the mex -setup command. The compiler you choose remains the default until you call mex -setup to select a different default.

For example, to change the default C compiler at the MATLAB command prompt, type:

mex -setup

or

mex -setup c

If you have multiple C compilers, MATLAB displays a message with links to set up a different compiler. If you do not specify the language argument c, MATLAB displays links to the other supported languages. Select a link to change the default.

If you call mex -setup from an operating system prompt, MATLAB displays messages with the appropriate mex command syntax. Copy this statement and paste the command in the system prompt.

See Also

Was this topic helpful?