Using the C Math Library    

Building an Application 

C source code for the example ex1.c is included in the
<matlab>\extern\examples\cmath directory, where <matlab> represents the top-level directory where MATLAB is installed on your system. To verify that mbuild is properly configured on your system to create stand-alone applications, enter at the DOS prompt:

This creates the file called ex1.exe. Stand-alone applications created on Windows 95 or NT always have the extension .exe. The created application is a 32-bit Microsoft Windows console application. For answers to some common build problems, see Troubleshooting mbuild.

Shared Libraries (DLLs)

All the WIN32 Dynamic Link Libraries (DLLs) for the MATLAB C Math Library are in the directory

The .def files for the Microsoft and Borland compilers are in the <matlab>\extern\include directory. Import libraries for supported compilers can be found in <matlab>\extern\lib\win32\<compiler>.

Before running a stand-alone application, you must ensure that the directory containing the DLLs is on your path. The directory must be on your operating system $PATH environment variable. On Windows 95, set the value in your autoexec.bat file; on Windows NT, use the Control Panel to set it.

Running Your Application

You can now run your stand-alone application by launching it from the command line. For example,


 Configuring the Build Environment mbuild Options