External Interfaces Previous page   Next Page

Compiling and Linking on Windows

To compile and link Fortran or C MAT-file programs, use the mex script with a MAT options file. The MAT options files reside in $MATLAB\bin\win32\mexopts and are named *engmatopts.bat, where * represents the compiler type (e.g., bcc for Borland, wat for Watcom, etc.).

For example, to compile and link the stand-alone MAT application matcreat.c using MSVC Version 7.1 on Windows, first copy the file

(where $MATLAB is the MATLAB root directory) to a directory that is writable, and then use the following command to build it:

If you need to modify the options file for your particular compiler, use the -v switch to view the current compiler and linker settings and then make the appropriate changes in a local copy of the options file.


Previous page  Compiling and Linking on UNIX Required Files from Third-Party Sources Next page

© 1994-2005 The MathWorks, Inc.