| Contents | Index |
| On this page… |
|---|
The example in this chapter shows you how to transform the MATLAB function magic into a deployable standalone application or shared library component.
The steps in this example vary, depending on if you want to deploy your MATLAB code as a standalone or as a shared library. If you are unsure about which target to select for your deployment, see When to Create a Standalone Application and When to Create a Shared Library
A magic square is simply a square array of integers arranged so that their sum is the same when added vertically, horizontally, or diagonally.
The examples for MATLAB Compiler are in matlabroot\extern\examples\compiler. For matlabroot, substitute the MATLAB root folder on your system. Type matlabroot to see this folder name.
Note If you are using a non-Windows operating system, "console applications" are referred to as "standalone applications". |
Watch a video about deploying applications using MATLAB Compiler.
| If you want to... | See... |
|---|---|
| Write MATLAB code that can be easily deployed | MATLAB Code Deployment |
| See more examples of creating standalones and shared libraries | C and C++ Standalone Executable and Shared Library Creation |
| See more examples of how to integrate your shared libraries into larger scale enterprise C and C++ applications | Deployment Process |
| Learn more about the MATLAB Compiler Runtime and MCR Installer | The MCR Installer |
| Installing MATLAB Compiler and running mbuild | Installation and Configuration |
| Deploying standalones and shared libraries on Mac® or Linux | Using MATLAB Compiler on Mac or Linux |
![]() | MATLAB Compiler Prerequisites | Creating a Standalone Application or Shared Library From MATLAB Code | ![]() |

Learn how to build standalone executables and C/C++ shared libraries from MATLAB code.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |