Main Content

Set Run-Time Library Path on Windows Systems

At run time, tell the operating system where the API shared libraries reside by setting the Path environment variable. Set the value to the path returned by the following MATLAB® command:

res = fullfile(matlabroot,'bin',computer('arch'))

Change Path Each Time You Run the Application

To set the run-time library path from the Windows® command prompt, type the following command, where res is the value returned from the fullfile command. Set the path every time that you open the Windows Command Processor.

set PATH=res;%PATH%

Set the path each time that you open the Windows prompt.

Permanently Change Path

To set the run-time library path permanently to res, modify the Path variable using the Control Panel. For the setting to take effect, close the command prompt window, then open a new command prompt window.

To remove the run-time library path, follow the same instructions, deleting the path name from the variable.

Troubleshooting

If you have multiple versions of MATLAB installed on your system, the version you use to build your engine applications must be the first listed in your system Path environment variable. Otherwise, MATLAB displays Can't start MATLAB engine.