Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB Compiler   

Failure Points and Possible Solutions

How to Use this Section

Use the following list of questions to diagnose some of the more common issues associated with using MATLAB Compiler software.

Does the Failure Occur During Compilation?

You typically compile your MATLAB code on a development machine, test the resulting executable on that machine, and deploy the executable and MATLAB Compiler Runtime (MCR) to a test or customer machine without MATLAB. The compilation process performs dependency analysis on your MATLAB code, creates an encrypted archive of your code and required toolbox code, generates wrapper code, and compiles the wrapper code into an executable. If your application fails to build an executable, the following questions may help you isolate the problem.

 Is your selected compiler supported by MATLAB Compiler?

 Are error messages produced at compile time?

 Did you compile with the verbose flag?

 Are you compiling within or outside of MATLAB?

 Does a simple read/write application such as "Hello World" compile successfully?

 Have you tried to compile any of the examples in MATLAB Compiler help?

 Does your code compile with the LCC compiler?

 Did the MATLAB code compile successfully before this failure?

 Are you receiving errors when trying to compile a shared library?

 If you are compiling a driver application, are you using mbuild?

 Are you trying to compile your driver application using Microsoft Visual Studio or another IDE?

 Are you importing the correct versions of import libraries?

 Are you able to compile the matrixdriver example?

 Do you get the MATLAB:I18n:InconsistentLocale Warning?

Does the Failure Occur When Testing Your Application?

After you have successfully compiled your application, the next step is to test it on a development machine and deploy it on a target machine. Typically the target machine does not have a MATLAB installation and requires that the MATLAB Compiler Runtime (MCR) be installed. A distribution includes all of the files that are required by your application to run, which include the executable, CTF archive and the MCR.

See Deployment Process, for information on distribution contents for specific application types and platforms.

Test the application on the development machine by running the application against the MCR shipped with MATLAB Compiler. This will verify that library dependencies are correct, that the CTF archive can be extracted and that all MATLAB code, MEX—files and support files required by the application have been included in the archive. If you encounter errors testing your application, the questions in the column to the right may help you isolate the problem.

 Are you able to execute the application from MATLAB?

 Does the application begin execution and result in MATLAB or other errors?

 Does the application emit a warning like "MATLAB file may be corrupt"?

 Do you have multiple MATLAB versions installed?

 If you are testing a standalone executable or shared library and driver application, did you install the MCR?

 Do you receive an error message about a missing DLL?

 Are you receiving errors when trying to run the shared library application?

Does the Failure Occur When Deploying the Application to End Users?

After the application is working on the test machine, failures can be isolated in end-user deployment. The end users of your application need to execute MCRInstaller in order to install the MATLAB Compiler Runtime (MCR) on their machines. The MCR includes a set of shared libraries that provides support for all features of MATLAB. If your application fails during end-user deployment, the following questions in the column to the right may help you isolate the problem.

 Is the MCR installed?

 If running on UNIX or Mac, did you update the dynamic library path after installing the MCR?

 Do you receive an error message about a missing DLL?

 Do you have write access to the directory the application is installed in?

 Are you executing a newer version of your application?

  


Free MATLAB Compiler Interactive Kit

Learn how to build standalone executables and C/C++ shared libraries from MATLAB code.


Get free kit

Trials Available

Try the latest version of MATLAB Compiler.


Get trial software
 © 1984-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS