MATLAB COMPILER RELEASE NOTES Guía de usuario Pagina 97

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 264
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 96
Building Shared Libraries
4-27
Building Shared Libraries
You can use mbuild to build C shared libraries on both UNIX and the PC. All
of the
mbuild options that pertain to creating stand-alone applications also
pertain to creating C shared libraries. To create a C shared library, specify one
ormorefileswiththe
.exports extension.The.exports files are text files that
contain the names of the functions to export from the shared library, one per
line. You can i nclude comments in your code by beginning a line (first column)
with
#ora*. mbuild treatstheselinesas commentsand ignoresthem.mbuild
merges multiple .exports files into one master exports list.
For example, given
file1.exports as
times2
times3
and file1.c as
int times2(int x)
{
return 2 * x;
}
int times3(int x)
{
return 3 * x;
}
The command
mbuild file1.c file1.exports
creates a shared library named file1.ext,whereext is the
platform-dependent shared library extension. Forexample, on the PC, itwould
be called
file1.dll. The shared library exports the symbols times2 and
times3.
Vista de pagina 96
1 2 ... 92 93 94 95 96 97 98 99 100 101 102 ... 263 264

Comentarios a estos manuales

Sin comentarios