Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - Русский

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Dynamic/incremental Link > ilib_mex_build


utility for mex library management

Calling Sequence

ilib_mex_build(lib_name,table,files,libs [,makename,ldflags,cflags,fflags,cc])



a character string, the generic name of the library without path and extension.


3 column string matrix giving the table of 'scilab-name', 'interface name', 'cmex' or 'fmex'


string matrix giving objects files needed for shared library creation


string matrix giving extra libraries needed for shared library creation


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.


character strings to provide options/flags for the loader, the C compiler, the Fortran compiler. cc provides the name of the compiler.


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.



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]);'


See Also

  • addinter — new functions interface dynamic link at run time.
  • link — dynamic linker
  • ilib_compile — ilib_build utility: executes the Makefile produced by ilib_gen_Make
  • ilib_gen_Make — utility for ilib_build: produces a Makefile for building shared libraries
  • ilib_gen_gateway — utility for ilib_build, generates a gateway file.
  • ilib_gen_loader — utility for ilib_build: generates a loader file
  • ilib_for_link — utility for shared library management with link
  • api_scilab — api_scilab is the Scilab interface to read/write data from/to Scilab memory
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Apr 02 17:37:35 CEST 2013