Print Preview - C:TEMPApdf 1303 .

2y ago
27 Views
2 Downloads
2.19 MB
525 Pages
Last View : 1m ago
Last Download : 2m ago
Upload by : Ciara Libby
Transcription

MATLAB Compiler User’s GuideR2011b

How to Contact MathWorksWebNewsgroupwww.mathworks.com/contact TS.html Technical service@mathworks.cominfo@mathworks.comProduct enhancement suggestionsBug reportsDocumentation error reportsOrder status, license renewals, passcodesSales, pricing, and general information508-647-7000 (Phone)508-647-7001 (Fax)The MathWorks, Inc.3 Apple Hill DriveNatick, MA 01760-2098For contact information about worldwide offices, see the MathWorks Web site.MATLAB Compiler User’s Guide COPYRIGHT 1995–2011 by The MathWorks, Inc.The software described in this document is furnished under a license agreement. The software may be usedor copied only under the terms of the license agreement. No part of this manual may be photocopied orreproduced in any form without prior written consent from The MathWorks, Inc.FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentationby, for, or through the federal government of the United States. By accepting delivery of the Programor Documentation, the government hereby agrees that this software or documentation qualifies ascommercial computer software or commercial computer software documentation as such terms are usedor defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms andconditions of this Agreement and only those rights specified in this Agreement, shall pertain to and governthe use, modification, reproduction, release, performance, display, and disclosure of the Program andDocumentation by the federal government (or other entity acquiring for or through the federal government)and shall supersede any conflicting contractual terms or conditions. If this License fails to meet thegovernment’s needs or is inconsistent in any respect with federal procurement law, the government agreesto return the Program and Documentation, unused, to The MathWorks, Inc.TrademarksMATLAB and Simulink are registered trademarks of The MathWorks, Inc. Seewww.mathworks.com/trademarks for a list of additional trademarks. Other product or brandnames may be trademarks or registered trademarks of their respective holders.PatentsMathWorks products are protected by one or more U.S. patents. Please seewww.mathworks.com/patents for more information.

Revision HistorySeptember 1995March 1997January 1998January 1999September 2000October 2001July 2002June 2004August 2004October 2004November 2004March 2005September 2005March 2006September 2006March 2007September 2007March 2008October 2008March 2009September 2009March 2010September 2010April 2011September 2011First printingSecond printingThird printingFourth printingFifth printingOnline onlySixth printingOnline onlyOnline onlyOnline onlyOnline onlyOnline onlyOnline onlyOnline onlyOnline onlyOnline onlySeventh printingOnline onlyOnline onlyOnline onlyOnline onlyOnline onlyOnline onlyOnline onlyOnline onlyRevised for Version 1.2Revised for Version 2.0 (Release 11)Revised for Version 2.1 (Release 12)Revised for Version 2.3Revised for Version 3.0 (Release 13)Revised for Version 4.0 (Release 14)Revised for Version 4.0.1 (Release 14 )Revised for Version 4.1 (Release 14SP1)Revised for Version 4.1.1 (Release 14SP1 )Revised for Version 4.2 (Release 14SP2)Revised for Version 4.3 (Release 14SP3)Revised for Version 4.4 (Release 2006a)Revised for Version 4.5 (Release 2006b)Revised for Version 4.6 (Release 2007a)Revised for Version 4.7 (Release 2007b)Revised for Version 4.8 (Release 2008a)Revised for Version 4.9 (Release 2008b)Revised for Version 4.10 (Release 2009a)Revised for Version 4.11 (Release 2009b)Revised for Version 4.13 (Release 2010a)Revised for Version 4.14 (Release 2010b)Revised for Version 4.15 (Release 2011a)Revised for Version 4.16 (Release 2011b)

ContentsGetting Started1Product Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .What Does This Product Do? . . . . . . . . . . . . . . . . . . . . . . . .How Do I Use This Product? . . . . . . . . . . . . . . . . . . . . . . . . .How Does This Product Work? . . . . . . . . . . . . . . . . . . . . . . .1-21-21-41-4MATLAB Compiler Prerequisites . . . . . . . . . . . . . . . . . . .Your Role in the Application Deployment Process . . . . . . .What You Need to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . .Products, Compilers, and IDE Installation . . . . . . . . . . . . .Compiler Selection with mbuild -setup . . . . . . . . . . . . . . . .Dependency and Non-Compilable Code Considerations . . .For More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-71-71-91-91-101-101-10The Magic Square Example . . . . . . . . . . . . . . . . . . . . . . . . .About This Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-121-12Magic Square Example: Creating a StandaloneExecutable or Shared Library From MATLABCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .magicsquare Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Deployable Standalone or Shared Library Creation . . . . . .Packaging (Optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Package Copying (Optional) . . . . . . . . . . . . . . . . . . . . . . . . .1-131-141-151-171-19Magic Square Example: C/C Developer Tasks . . . . . .Gathering Files Necessary for Deployment . . . . . . . . . . . . .Distribute to End Users . . . . . . . . . . . . . . . . . . . . . . . . . . . .Installing the MATLAB Compiler Runtime (MCR) . . . . . .Build and Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-201-211-211-211-23For More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-24v

Installation and Configuration2Before You Install MATLAB Compiler . . . . . . . . . . . . . .Install MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Install an ANSI C or C Compiler . . . . . . . . . . . . . . . . . . .2-22-22-2Installing MATLAB Compiler . . . . . . . . . . . . . . . . . . . . . .Installing Your Product . . . . . . . . . . . . . . . . . . . . . . . . . . . .Compiler Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-62-62-6Configuring the MCR Installer For Invocation From aNetwork Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-7Configuring Your Options File with mbuild . . . . . . . . . .What Is mbuild? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .When Not to Use mbuild -setup . . . . . . . . . . . . . . . . . . . . . .Running mbuild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Locating and Customizing the Options File . . . . . . . . . . . .2-82-82-82-92-11If You Have Installation Problems . . . . . . . . . . . . . . . . . . .2-14MATLAB Code Deployment3MATLAB Application Deployment Products.Application Deployment Products and the DeploymentTool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .What Is the Difference Between the Deployment Tool andthe mcc Command Line? . . . . . . . . . . . . . . . . . . . . . . . . .How Does MATLAB Compiler Software Build MyApplication? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Dependency Analysis Function (depfun) . . . . . . . . . . . . . . .MEX-Files, DLLs, or Shared Libraries . . . . . . . . . . . . . . . .Component Technology File (CTF Archive) . . . . . . . . . . . . .viContents3-23-43-43-43-73-83-8

Writing Deployable MATLAB Code . . . . . . . . . . . . . . . . . .Compiled Applications Do Not Process MATLAB Files atRuntime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Do Not Rely on Changing Directory or Path to Control theExecution of MATLAB Files . . . . . . . . . . . . . . . . . . . . . . .Use ismcc and isdeployed Functions To ExecuteDeployment-Specific Code Paths . . . . . . . . . . . . . . . . . . .Gradually Refactor Applications That Depend onNoncompilable Functions . . . . . . . . . . . . . . . . . . . . . . . . .Do Not Create or Use Nonconstant Static StateVariables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Get Proper Licenses for Toolbox Functionality You Want toDeploy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-123-123-133-143-143-153-15How the Deployment Products Process MATLABFunction Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . .MATLAB Function Signature . . . . . . . . . . . . . . . . . . . . . . .MATLAB Programming Basics . . . . . . . . . . . . . . . . . . . . . .3-173-173-17MATLAB Library Loading . . . . . . . . . . . . . . . . . . . . . . . . . .3-19MATLAB Data File (MAT Files) . . . . . . . . . . . . . . . . . . . . .Load and Save Functions . . . . . . . . . . . . . . . . . . . . . . . . . . .MATLAB Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-213-213-24C and C Standalone Executable and SharedLibrary Creation4Supported Compilation Targets . . . . . . . . . . . . . . . . . . . . .Standalone Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Shared Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-24-24-2Standalone Executable and Shared Library CreationFrom MATLAB Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using the Deployment Tool . . . . . . . . . . . . . . . . . . . . . . . . .Using the Command Line (mcc) . . . . . . . . . . . . . . . . . . . . . .Watch a Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-34-34-34-5vii

Input and Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Standalone Executable . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C Shared Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C Shared Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Macintosh 64 (Maci64) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-64-64-74-94-11Dependency Analysis Function (depfun) and UserInteraction with the Compilation Path . . . . . . . . . . . .addpath and rmpath in MATLAB . . . . . . . . . . . . . . . . . . . .Passing -I directory on the Command Line . . . . . . . . . . .Passing -N and -p directory on the Command Line . . . .4-124-124-124-12Deployment Process5viiiContentsOverview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Watch a Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-25-2Deploying to Developers . . . . . . . . . . . . . . . . . . . . . . . . . . .Steps by the developer to Deploy to Developers . . . . . . . . .What Software Does a Developer Need? . . . . . . . . . . . . . . .Ensuring Memory for Deployed Applications . . . . . . . . . . .5-35-35-45-8Deploying to End Users . . . . . . . . . . . . . . . . . . . . . . . . . . . .Steps by the Developer to Deploy to End Users . . . . . . . . .What Software Does the End User Need? . . . . . . . . . . . . . .Using Relative Paths with Project Files . . . . . . . . . . . . . . .Porting Generated Code to a Different Platform . . . . . . . . .Extracting a CTF Archive Without Executing theComponent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Ensuring Memory for Deployed Applications . . . . . . . . . . .5-95-95-125-155-15Working with the MCR . . . . . . . . . . . . . . . . . . . . . . . . . . . . .About the MATLAB Compiler Runtime (MCR) . . . . . . . . .The MCR Installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Installing the MCR Non-Interactively (Silent Mode) . . . . .Removing (Uninstalling) the MCR . . . . . . . . . . . . . . . . . . . .Retrieving MCR Attributes . . . . . . . . . . . . . . . . . . . . . . . . .5-175-175-185-265-285-315-155-16

Improving Data Access Using the MCR User DataInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Displaying MCR Initialization Start-Up and CompletionMessages For Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-335-46Deploying a Standalone Application on a NetworkDrive (Windows Only) . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-49MATLAB Compiler Deployment Messages . . . . . . . . . . .5-51Using MATLAB Compiler Generated DLLs in WindowsServices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-52Reserving Memory for Deployed Applications withMATLAB Memory Shielding . . . . . . . . . . . . . . . . . . . . . .What Is MATLAB Memory Shielding and When Should YouUse It? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Requirements for Using MATLAB Memory Shielding . . . .Invoking MATLAB Memory Shielding for Your DeployedApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-535-535-545-54Compiler Commands6Command Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Compiler Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Combining Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Conflicting Options on the Command Line . . . . . . . . . . . . .Using File Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Interfacing MATLAB Code to C/C Code . . . . . . . . . . . . .6-26-26-26-36-36-4Using Macros to Simplify Compilation . . . . . . . . . . . . . . .Macro Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Working With Macro Options . . . . . . . . . . . . . . . . . . . . . . . .6-56-56-5Using Path Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-8ix

xContentsUsing Bundle Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-9Using Wrapper Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .What Are Wrapper Files? . . . . . . . . . . . . . . . . . . . . . . . . . . .Main File Wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C Library Wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C Library Wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-116-116-116-126-13MCR Component Cache and CTF ArchiveEmbedding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Overriding Default Behavior . . . . . . . . . . . . . . . . . . . . . . . .For More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-146-156-16Using Pragmas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using feval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Example: Using %#function . . . . . . . . . . . . . . . . . . . . . . . . .6-176-176-17Using mxArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-19Script Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Converting Script MATLAB Files to Function MATLABFiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Including Script Files in Deployed Applications . . . . . . . . .6-20Compiler Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Calling a Function from the Command Line . . . . . . . . . . . .Using MAT-Files in Deployed Applications . . . . . . . . . . . . .Compiling a GUI That Contains an ActiveX Control . . . . .Debugging MATLAB Compiler Generated Executables . .Deploying Applications That Call the Java NativeLibraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Locating .fig Files in Deployed Applications . . . . . . . . . . . .Blocking Execution of a Console Application That CreatesFigures and Terminating Figures by Force . . . . . . . . . . .Passing Arguments to and from a StandaloneApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using Graphical Applications in Shared Library Targets . .Using the VER Function in a Compiled MATLABApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -28

Standalone Applications7Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-2Standalone Application Target . . . . . . . . . . . . . . . . . . . . .Compiling the Application . . . . . . . . . . . . . . . . . . . . . . . . . .Testing the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Deploying the Application . . . . . . . . . . . . . . . . . . . . . . . . . .Running the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-37-37-37-47-6Combining Your MATLAB and C/C Code . . . . . . . . . . .7-8Libraries8Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-2Addressing mwArrays Above the 2 GB Limit . . . . . . . . .8-3C Shared Library Target . . . . . . . . . . . . . . . . . . . . . . . . . . .C Shared Library Wrapper . . . . . . . . . . . . . . . . . . . . . . . . . .C Shared Library Example . . . . . . . . . . . . . . . . . . . . . . . . . .Calling a Shared Library . . . . . . . . . . . . . . . . . . . . . . . . . . .Using C Shared Libraries On a Mac OS X System . . . . . . .8-48-48-48-138-17C Shared Library Target . . . . . . . . . . . . . . . . . . . . . . . . .C Shared Library Wrapper . . . . . . . . . . . . . . . . . . . . . . . .C Shared Library Example . . . . . . . . . . . . . . . . . . . . . . .8-188-188-18MATLAB Compiler Generated Interface Functions . .Functions in the Shared Library . . . . . . . . . . . . . . . . . . . . .Type of Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Structure of Programs That Call Shared Libraries . . . . . .Library Initialization and Termination Functions . . . . . . .Print and Error Handling Functions . . . . . . . . . . . . . . . . . .Functions Generated from MATLAB Files . . . . . . . . . . . . .8-258-258-258-278-288-298-31xi

Retrieving MCR State Information While Using SharedLibraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-36About Memory Management and Cleanup . . . . . . . . . . .Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Passing mxArrays to Shared Libraries . . . . . . . . . . . . . . . .8-378-378-37Troubleshooting9Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-2Common Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-3Failure Points and Possible Solutions . . . . . . . . . . . . . . .How to Use this Section . . . . . . . . . . . . . . . . . . . . . . . . . . . .Does the Failure Occur During Compilation? . . . . . . . . . . .Does the Failure Occur When Testing Your Application? . .Does the Failure Occur When Deploying the Application toEnd Users? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-49-49-49-99-12mbuild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-14MATLAB Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-16Deployed Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-20Limitations and Restrictions10Limitations About What May Be Compiled . . . . . . . . . . .Compiling MATLAB and Toolboxes . . . . . . . . . . . . . . . . . . .Fixing Callback Problems: Missing Functions . . . . . . . . . .Finding Missing Functions in a MATLAB File . . . . . . . . . .xiiContents10-210-210-310-5

Suppressing Warnings on the UNIX System . . . . . . . . . . .Cannot Use Graphics with the -nojvm Option . . . . . . . . . .Cannot Create the Output File . . . . . . . . . . . . . . . . . . . . . .No MATLAB File Help for Compiled Functions . . . . . . . . .No MCR Versioning on Mac OS X . . . . . . . . . . . . . . . . . . . .Older Neural Networks Not Deployable with MATLAB Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Restrictions on Calling PRINTDLG with MultipleArguments in Compiled Mode . . . . . . . . . . . . . . . . . . . . .Compiling a Function with WHICH Does Not SearchCurrent Working Directory . . . . . . . . . . . . . . . . . . . . . . .Restrictions on Using C SETDATA to DynamicallyResize an MWArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-510-610-610-610-7Unsupported Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-910-710-710-810-8Reference Information11Directories Required for Development and Testing . . .Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Path for Java Development on All Platforms . . . . . . . . . . .Path Modifications Required for Accessibility . . . . . . . . . . .Windows Settings for Development and Testing . . . . . . . .UNIX Settings for Development and Testing . . . . . . . . . . .11-211-211-211-211-311-3Directories Required for Run-Time Deployment . . . . . .General Path Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . .Path for Java Applications on All Platforms . . . . . . . . . . . .Windows Path for Run-Time Deployment . . . . . . . . . . . . . .UNIX Paths for Run-Time Deployment . . . . . . . . . . . . . . . .11-511-511-511-511-6MATLAB Compiler Licensing . . . . . . . . . . . . . . . . . . . . . .Using MATLAB Compiler Licenses for Development . . . .11-811-8xiii

Function Reference12Pragmas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-2.12-2API Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-3Command-Line ToolsFunctions — Alphabetical List13MATLAB Compiler Quick ReferenceACommon Uses of MATLAB Compiler . . . . . . . . . . . . . . .Create a Standalone Application . . . . . . . . . . . . . . . . . . . . .Create a Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A-2A-2A-2mcc Command Arguments Listed Alphabetically . . . . .A-4.A-8mcc Command Line Arguments Grouped by TaskUsing MATLAB Compiler on UNIXBxivContentsOverview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .B-2Installing MATLAB Compiler on UNIX . . . . . . . . . . . . . .Installing MATLAB Compiler . . . . . . . . . . . . . . . . . . . . . .B-3B-3

Selecting Your gcc Compiler . . . . . . . . . . . . . . . . . . . . . . . . .Custom Configuring Your Options File . . . . . . . . . . . . . . . .Install X Code from DVD on Maci64 . . . . . . . . . . . . . . . . . .B-3B-3B-3Building Your UNIX Application . . . . . . . . . . . . . . . . . . . .Compiling Your Application with the Deployment Tool . . .Compiling Your Application with the Command Line . . . .B-4B-4B-4Testing Your UNIX Application . . . . . . . . . . . . . . . . . . . . .B-5Deploying Your UNIX Application . . . . . . . . . . . . . . . . . . .Installing the MCR on UNIX . . . . . . . . . . . . . . . . . . . . . . . .Performing a Silent Installation of the MCR on Linux andMac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using Run Script to Set MCR Paths . . . . . . . . . . . . . . . . . .B-6B-6Running Your 64-Bit Mac Application . . . . . . . . . . . . . . .Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Installing the Macintosh Application Launcher PreferencePane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Configuring the Installation Area . . . . . . . . . . . . . . . . . . . .Launching the Application . . . . . . . . . . . . . . . . . . . . . . . . . .B-7B-7B-6B-6B-7B-7B-10Error and Warning MessagesCAbout Error and Warning Messages . . . . . . . . . . . . . . . . .C-2Compile-Time Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C-3Warning Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C-6depfun Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .About depfun Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .MCR/Dispatcher Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . .XML Parser Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .depfun-Produced Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . .C-9C-9C-9C-9C-10xv

C Utility Library ReferenceDData Conversion Restrictions for the C MWArrayAPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D-2Primitive Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D-3Utility Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D-4mwString Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .About mwString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D-5D-5D-5D-5D-5mwException Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .About mwException . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D-21D-21D-21D-21D-21mwArray Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .About mwArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Static Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D-30D-30D-30D-31D-32D-33Application Deployment GlossaryEGlossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xviContentsE-2

Indexxvii

xviiiContents

1Getting Started “Product Overview” on page 1-2 “MATLAB Compiler Prerequisites” on page 1-7 “The Magic Square Example” on page 1-12 “Magic Square Example: Creating a Standalone Executable or SharedLibrary From MATLAB Code” on page 1-13 “Magic Square Example: C/C Developer Tasks” on page 1-20 “For More Information” on page 1-24

1Getting StartedProduct OverviewIn this section.“What Does This Product Do?” on page 1-2“How Do I Use This Product?” on page 1-4“How Does This Product Work?” on page 1-4What Does This Product Do?MATLAB Compiler compiles a MATLAB application into a standaloneapplication or software component. The act of compiling this code issometimes referred to as building.Building with MATLAB Compiler enables you to run your MATLABapplication outside the MATLAB environment. It reduces applicationdevelopment time by eliminating the need to translate your code into adifferent language. If you are building a standalone application, MATLABCompiler produces an executable for your end users. If you integrate into C orC , MATLAB Compiler provides an interface to use your code as a sharedlibrary. If you integrate into other development languages, MATLAB builderproducts (available separately) let you package your MATLAB applications assoftware components. You are able to use Java classes, .NET components,or Microsoft Excel add-ins.Note If you are using a non-Windows operating system, “consoleapplications” are referred to as “standalone applications”.When To Use MATLAB CompilerUse MATLAB Compiler to: Deploy C or C code that interfaces with MATLAB Package MATLAB applications as executables and shared libraries Distribute royalty-free, standalone executables and software components1-2

Product Overview Incorporate MATLAB-based algorithms into applications developed usingother languages and technologies Encrypt and protect MATLAB codeWhen Not To Use MATLAB CompilerDo not use MATLAB Compiler and builder products for applications shownon the following table. Instead, use the recommended MathWorks productindicated.To.Use. Generate readable, efficient, andembeddable C code from MATLABcode“Documentation Set” for CodeGeneration from MATLAB Generate MEX functions fromMATLAB code for rapid prototypingand verification of generated C codewithin MATLAB Integrate MATLAB code intoSimulink Speed up fixed-point MATLAB code Generate hardware descriptionlanguage (HDL) from MATLAB code Integrate custom C code into MATLABwith MEX filesMATLAB External Interfaces Call MATLAB from C and FortranprogramsDeploy Java components into enterprisecomputing environments and toMATLAB usersMATLAB Builder JA User’sGuide1-3

1Getting StartedTo.Use.Deploy .NET and COM components intoenterprise computing environments andto MATLAB usersMATLAB Builder NE User’sGuideDeploy Excel add-ins to enterprisecomputing environments and toMATLAB usersMATLAB Builder EX User’sGuideHow Do I Use This Product?You use MATLAB Compiler by running the Deployment Tool GUI(deploytool) or executing the mcc command from MATLAB.How Does This Product Work?MATLAB Compiler readies your application for deployment to enterprisecomputing environments using a combination of generated applications,libraries, and wrapper files.MATLAB Compiler Generated Applications and LibrariesWhen you package and distribute applications and libraries that MATLABCompiler generates, you include the MATLAB Compiler Runtime (MCR). Youcan include a set of supporting files generated by MATLAB Comp

info@mathworks.com Sales, pricing, and general information 508-647-7000 (Phone) 508-647-7001 (Fax) The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098 For contact information about worldwide offices, see the MathWorks Web site. . MATLAB

Related Documents:

018947 t125/70d17 bl 5 98m na-- tempa spare tracompa tr2d 175.00 120065 t125/90d16 bl 4 98m na-- tempa spare tr2 150.00 . 129362 t135/80d15 bl 5 99m na-- tempa spare tracompa tr2d 149.00 138681 t135/80d16 bl 4 101m na-- tempa spare tr2 158.00 090840 t135/90d15 bl 4 (blank) na-- tempa spare tr2 149.00 .

Zend avesta em portugues pdf. You are reading a free preview pages 33 through 39 are not shown in this preview. You are reading a free 50 page view page is not shown in this preview. You are reading a free preview pages 56 through 64 are not shown in this preview. You are reading a free preview pages 70 to 100 are not shown in this preview.

GEOG 1303 World Regional Geography 3 GRG 1312 World Regional Geography 3 GOVT 2305 United State Gov 3 POLS 1303 Intro American Gov 3 GOVT 2306 Texas State And Local Gov 3 POLS 1303 Intro American Gov 3 HIST 1301 United States History I 3 HIS 1301 US History to 1877 3 HIST 1302 United States History II 3 HIS 1302 US History From 1877 3 .

Geography 1303 / World Regional Geography Course Information & Syllabus Houston Community College – Southwest / Stafford Fall 2016 / 1303 Page 6 of 9 Version 9/19/2016 Posted Possession of drugs, alcohol or firearms on college property is illegal. Eating, drinking, smoking and soliciting are not allowed in classrooms. Pads, telephones an

SMU PHYSICS 1303: Introduction to Mechanics Stephen Sekula1 1Southern Methodist University Dallas, TX, USA SPRING, 2019 S. Sekula (SMU) SMU — PHYS 1303 SPRING, 2019 1

preview-latex preview-latex is a package embedding preview fragments into Emacs source buffers under the AUCTEX editing environment for LaTEX. It uses preview.sty for the extraction of certain environments (most notably displayed formulas). Other applications of this

By Imran Ali - April 10, 2020 Home / Books / Suno tum sitary ho 700.00 Additional information Reviews (0) You're Reading a Free Preview Pages 12 to 23 are not shown in this preview. You're Reading a Free Preview Pages 28 to 55 are not shown in this preview. You're Reading a Free Preview Pages 62 to 67 are not

Print Your Card 13. To print your card, click the Print button. To get a high quality print out, click the Properties button, select the type of paper, and adjust the print quality settings to the highest setting possible. If you have chosen a single-fold card, the program will pause after the first side has printed.File Size: 2MBPage Count: 8Discover on this pageHow to fold greeting cards in half?How to print a card 13?How to print greeting cards in Jasc Paint Shop?