User`s guide
7 Libraries
Note If your driver application displays MATLAB figure windows, you
should include a ca ll to
mclWaitForFiguresToDie(NULL) before calling
the
Terminate functions and mclTermi nateApplication in the following
two steps.
5 Call, once for each library, <libraryname >Terminate, to destroy the
associated MCR.
6 Call mclTerminateApplication to free resources associated with the
global MCR state.
7 Clean up varia bles, close files, etc., and exit.
This example uses
matrixdriver.c as the d river application.
Note You must call mclInitia lize Application once at the beginning of
your driver application. You must make this call before calling any other
MathWorks functions. See “Calling a Shared Library” on page 7-11 for
complete details on using a MATLAB Compiler generated library in your
application.
Compiling the Driver Application
To compile the driver code, matrixdrive r.c, you use your C/C++ compiler.
Execute the following
mbuild command that corresponds to your development
platform. This command uses your C/C++ compiler to compile the code.
mbuild matrixdriver.c libmatr ix.lib (Windows)
mbuild matrixdriver.c -L. -lmatrix -I. (UNIX)
7-6