This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

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 you open the Windows Command Processor.

set PATH=res;%PATH%

You must 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.

Windows 7

  • Select Computer from the Start menu.

  • Choose System properties from the context menu.

  • Click Advanced system settings > Advanced tab.

  • Click Environment Variables.

  • Under System variables, select Path and click Edit.

  • Modify Path by inserting res; at the beginning of the Variable value: text field.

  • Click Ok to close the dialog boxes, then close the Control Panel dialog box.


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.