User`s guide
Building Stand-Alone Applications on PCs
4-23
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, included in the
<matlab>\extern\examples\compiler directory. To verify that the MATLAB
Compiler can generate stand-alone applications on your 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 Windows console
application, by typing its name on the MS-DOS command line. The application
should run and display the message
Hello, World.
When you execute the
mcc command to link files and libraries, mcc actually
calls the
mbuild script to perform the functions.
About the mbuild Script
The mbuild script supports various options that allow you to customize the
building and linking of your code. Many users do not need to know any
additional details of the
mbuild script; they use it in its simplest form. For
complete information about the
mbuild script and its options, see the mbuild
reference page.
Using an Integrated Development Environment
The MathWorks provides a MATLAB add-in for the Visual Studio development
system that lets you work easily within the Microsoft Visual C/C++ (MSVC)
integrated development environment (IDE). The MATLAB add-in for Visual
Studio greatly simplifies using M-files in the MSVC environment. The add-in
automates the integration of M-files into Visual C++ projects. It is fully
integrated with the MSVC environment.