
3 Windows XP
3.1 Compiling M-files to Stand-Alone Applications
• Extract MatLab Compiling Files Win32.zip to the local compiling directory. This
ZIP-file contains some MATLAB M-files not found by the compiler although they
are within the MATLAB’s default path (see Section A.1 for details). Additionally
some dynamic linked libraries which are necessary for compiling due to an unknown
reason (it seems, that the MATLAB Compiler uses these binaries as substitute
for the missing corresponding source-code files). Note, that there is a remove.bat
batchfile which removes the extracted files from the harddisk in an easy way.
• Check, that the folder with the M-files to compile is the current folder within
MATLAB.
• Start compiling with the following flags:
mcc -m -B sgl name of function.m
Result: An executable file, c-files, h-files and some other files are written to the actual
compiling directory.
Note: For executing the *.exe it is necessary to extract MatLab Runtime DLLs Win32.zip
to the current directory or have them within in your local path. This ZIP-file con-
tains all the necessary libraries needed during execution of compiled code (see Sec-
tion A.2 for details). This is due to the fact, that some MATLAB-functions are
only available as binaries (no sourcecode available). Note, that there is a remove.bat
batchfile which removes the extracted files from the harddisk in an easy way.
3.2 Compiling M-Files to a DLL:
• Extract MatLab Compiling Files Win32.zip to the lo cal compiling directory
• Check, that the folder with the m-file to compile is current folder within MATLAB
• Start compiling with the following flags:
mcc -t -W lib:name of function lib -L C -T link:lib -h libmwsglm.mlib
libmmfile.mlib name of function.m
Result:
• the shared library name of function lib.dll
• library info file name of function lib.lib
• library header file name of function lib.h
6
Comentários a estes Manuais