User`s guide
Building Stand-Alone Applications on UNIX
4-13
Note On all UNIX platforms, the Compi ler libra ry is shipped as a shared
object (
.so) file or shared library (.sl). Any Compiler-generated, stand-alone
applicatio n must be able to locate the C/C++ libraries along the lib rary path
environment v ari able (
SHLIB_PATH, LIBPATH,orLD_LIBRARY_PATH)inorderto
be found and loaded. Consequently, to share a Compiler-generated,
stand-alone application with another user, you must provide all of the
required shared libraries. For more information about the required shared
libraries for UNIX, see “Distributing Stand-Alone UNIX Applications” on page
4-14.
Running Your Application
To launch your application, enter its name on the command line. For example,
ex1
ans =
1 3 5
2 4 6
ans =
1.0000 + 7.0000i 4.0000 +10.0000i
2.0000 + 8.0000i 5.0000 +11.0000i
3.0000 + 9.0000i 6.0000 +12.0000i
Verifying the MATLAB Compiler
There is MATLAB code for an example, hello.m,includedinthe<matlab>/
extern/examples/compiler
directory. To verify that the MATLAB Compiler
can generatestand-alone applicationsonyour system, type the following at the
MATLAB prompt.
mcc -m hello.m
This command should complete without errors. To run the stand-alone
application,
hello, invoke it as you would any other UNIX application,