- Manuel Scilab
- Link dynamique/incremental
- G_make
- addinter
- c_link
- call
- chooselcccompiler
- configure_ifort
- configure_msvc
- dllinfo
- findmsifortcompiler
- findmsvccompiler
- fort
- getdynlibext
- haveacompiler
- ilib_build
- ilib_compile
- ilib_for_link
- ilib_gen_Make
- ilib_gen_cleaner
- ilib_gen_gateway
- ilib_gen_loader
- ilib_mex_build
- ilib_verbose
- link
- Supported and compatible compilers
- ulink
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
ilib_mex_build
utility for mex library management
Calling Sequence
ilib_mex_build(lib_name,table,files,libs [,makename,ldflags,cflags,fflags,cc])
Arguments
- lib_name
a character string, the generic name of the library without path and extension.
- table
3 column string matrix giving the table of 'scilab-name', 'interface name', 'cmex' or 'fmex'
- files
string matrix giving objects files needed for shared library creation
- libs
string matrix giving extra libraries needed for shared library creation
- makename
character string. The path of the Makefile file without extension.
This parameter is useless since Scilab 5.0. Default value to use: [].
A warning will be displayed in Scilab 5.3 if you use another value that the default.
- ldflags,cflags,fflags,cc
character strings to provide options/flags for the loader, the C compiler, the Fortran compiler. cc provides the name of the compiler.
Description
This function is used to create mex libraries and to generate a loader file which can be used to dynamically load the mex shared library.
Note that the file name containing the mex code can be set in the third input argument (files
) or the second value of the table
input argument.
Note that a compiler must be available on the system to use this function.
Examples
cd(TMPDIR); mputl(['#include ""mex.h""' 'void mexFunction(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[])' '{' ' int *dims = mxGetDimensions(prhs[0]);' ' sciprint(""%d %d %d\n"",dims[0],dims[1],dims[2]);' '}'],'mexfunction16.c'); ilib_mex_build('libmex',['mexf16','mexfunction16','cmex'],[],[],'Makelib','','',''); exec(TMPDIR+'/loader.sce'); mexf16(rand(2,3,2));
See Also
<< ilib_gen_loader | Link dynamique/incremental | ilib_verbose >> |