Using the C Math Library | ![]() ![]() |
Overview
To build a stand-alone application using the MATLAB C Math Library, you must supply your ANSI C compiler with the correct set of compiler and linker options (or switches). To help you, The MathWorks provides a command line utility called mbuild
. The mbuild
script makes it easy to:
On UNIX and Microsoft Windows systems, follow these steps to build C applications with mbuild
:
You only need to reconfigure if you change compilers or upgrade your current compiler.
Figure 2-1 shows the sequence on both platforms. The sections following the flowchart provide more specific details for the individual platforms.
Figure 2-1: Sequence for Creating Stand-Alone C Applications
Compiler Options Files
mbuild
stores compiler and linker settings in an options file. Options files contain the required compiler and linker settings for your particular C compiler. The MathWorks provides options files for every supported C compiler.
Much of the information on options files in this chapter is provided for those users who may need to modify an options file to suit their specific needs. Many users never have to be concerned with how the options files work.
![]() | Building Stand-Alone C Applications | Building UNIX Applications | ![]() |