User`s guide

4 Stand-Alone Applications
4-12
specified options file for the current execution of mbuild only; it does not reset
the default compiler.
Verifying mbuild
There is C source code for an example ex1.c included in the <matlab>/extern/
examples/cmath
directory, where <matlab> represents the top- lev el direct ory
where MATLAB is installed on your system. To verify that
mbuild is properly
configured on your system to create stand-alone a pplications, copy
ex1.c to
your local directory and type
cd to change to that directory. Then, at the
MATLAB prompt, enter
mbuild ex1.c
This creates the file called ex1. Stand-alone applications created on UNIX
systems do not have any extensions.
Locating Shared Libraries
Before you can run y our stand-alone application, you must tell the system
where the API and C shared libraries reside. This table provides the necessary
UNIX commands depending on your system’s architecture.
It is convenient t o place this command in a startup script such a s
~/.cshrc.
Then the system will beableto locate theseshared librariesautomatically, and
you will not have to re-issue the command at the start of each login session.
Architecture Command
HP700/HP-UX
setenv SHLIB_PATH <matlab>/extern/lib/<arch>:$SHLIB_PATH
IBM RS/6000
setenv LIBPATH <matlab>/extern/lib/ibm_rs:$LIBPATH
All others
setenv LD_LIBRARY_PATH <matlab>/extern/lib/<arch>:$LD_LIBRARY_PATH
where:
<matlab> is the MATLAB root directory
<arch> is your architecture (i.e., alpha, hp700, hpux, lnx86, sgi, sgi64,orsol2)