User`s guide
iv Contents
Building Stand-Alone Applications on PCs . . . . . . . . . . . . . 4-15
Configuring for C or C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
Preparing to Compile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
Verifying mbuild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22
Verifying the MATLAB Compiler . . . . . . . . . . . . . . . . . . . . . . . 4-23
About the mbuild Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23
Using an Integrated Development Environment . . . . . . . . . . . 4-23
Packaging Windows Applications for Distribution . . . . . . . . . 4-26
Distributing Stand-Alone Applications . . . . . . . . . . . . . . . . . 4-27
Packaging the MATLAB Run-Time Libraries . . . . . . . . . . . . . 4-27
Installing Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-27
Problem Starting Stand-Alone Application . . . . . . . . . . . . . . . 4-28
Building Shared Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30
Building COM Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-31
Building Excel Plug-Ins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33
Troubleshooting mbuild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33
Troubleshooting the Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . 4-35
Coding with M-Files Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-36
Alternative Ways of Compiling M-Files . . . . . . . . . . . . . . . . . 4-40
Compiling MATLAB Provided M-Files Separately . . . . . . . . . 4-40
Compiling mrank.m and rank.m as Helper Functions . . . . . . 4-41
Mixing M-Files and C or C++ . . . . . . . . . . . . . . . . . . . . . . . . . . 4-42
Simple Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-42
Advanced C Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-47