MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manuel d'utilisateur Page 286

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 408
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 285
6 Importing and Exporting Data
6-30
Using the Options File
MATLAB provides an options file, matopts.sh, that lets you use the mex script
to easily compile and link MAT-file applications. For example, to compile and
link the
matcreat.c example, you can use
mex -f <matlab>/bin/matopts.sh <pathname>/matcreat.c
where <pathname> specifies the complete path to the specified file.
If you need to modify the options file for your particular compiler or platform,
use the
-v switch to view the current compiler and linker settings and then
make the appropriate changes in a local copy of the
matopts.sh file.
Compiling and Linking on Windows
To compile and link Fortran or C MAT-file programs, use the mex script with a
MAT options file. Table 1-2, Options Files, on page 1-17 lists the MAT options
files included in this release. All of these options files are located in
<
matlab>\bin\win32\mexopts.
As an example, to compile and link the stand-alone MAT application
matcreat.c on Windows using MSVC (Version 5.0), use
mex -f <matlab>\bin\win32\mexopts\msvc50engmatopts.bat <pathname>\matcreat.c
where <pathname> specifies the complete path to the specified file. 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.
Vue de la page 285
1 2 ... 281 282 283 284 285 286 287 288 289 290 291 ... 407 408

Commentaires sur ces manuels

Pas de commentaire