| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB Compiler |
| Contents | Index |
| Learn more about MATLAB Compiler |
| On this page… |
|---|
To locate your options file on Windows, the mbuild script searches the following locations:
Current folder
The user profile folder (see User Profile Directory Under Windows for more information about this folder)
mbuild uses the first occurrence of the options file it finds. If no options file is found, mbuild searches your machine for a supported C compiler and uses the factory default options file for that compiler. If multiple compilers are found, you are prompted to select one.
User Profile Directory Under Windows. The Windows user profile folder is a folder that contains user-specific information such as desktop appearance, recently used files, and Start menu items. The mbuild utility stores its options files, compopts.bat, which is created during the -setup process, in a subfolder of your user profile folder, named Application Data\MathWorks\MATLAB\current_release. Under Windows with user profiles enabled, your user profile folder is %windir%\Profiles\username. Under Windows with user profiles disabled, your user profile folder is %windir%. You can determine whether or not user profiles are enabled by using the Passwords control panel.
To locate your options file on UNIX, the mbuild script searches the following locations:
Current folder
$HOME/.matlab/current_release
matlabroot/bin
mbuild uses the first occurrence of the options file it finds. If no options file is found, mbuild displays an error message.
Although it is common to use one options file for all of your MATLAB Compiler related work, you can change your options file at anytime. The setup option resets your default compiler so that the new compiler is used every time. To reset your C or C++ compiler for future sessions, use
mbuild -setup
Modifying the Options File. You can use of the setup option to change your options file settings on Windows. The setup option copies the appropriate options file to your user profile folder.
To modify your options file on Windows:
Use mbuild -setup to make a copy of the appropriate options file in your local area.
Edit your copy of the options file in your user profile folder to correspond to your specific needs and save the modified file.
After completing this process, the mbuild script will use the new options file every time with your modified settings.
The setup option creates a user-specific, matlab folder in your individual home folder and copies the appropriate options file to the folder. (If the folder already exists, a new one is not created.) This matlab folder is used for your individual options files only; each user can have his or her own default options files (other MATLAB products may place options files in this folder). Do not confuse these user-specific matlab folders with the system matlab folder, where MATLAB is installed.
Modifying the Options File. You can use the setup option to change your options file settings on UNIX. For example, if you want to make a change to the current linker settings, or you want to disable a particular set of warnings, you should use the setup option.
To modify your options file on the Linux operating system:
Use mbuild -setup to make a copy of the appropriate options file in your local area.
Edit your copy of the options file to correspond to your specific needs and save the modified file.
This sets your default compiler's options file to your specific version.
![]() | Supported Compiler Restrictions | Compilation Process | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |