Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.1 - 日本語

Change language to:
English - Français - Português - Русский

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

Scilabヘルプ >> Dynamic/incremental Link > link


dynamic linker

Calling Sequence

x = link(files [, sub-names,flag]);
link(x , sub-names [, flag]);
lstID = link("show")
lst = link()



a character string or a vector of character strings, the files names used to define the new entry point (compiled routines, user libraries, system libraries,..)


a character string or a vector of character strings . Name of the entry points in files to be linked.


an integer which gives the id of a shared library linked into Scilab with a previous call to link.


character string 'f' or 'c' for Fortran (default) or C code.


returns the current linked ID routines.


returns names of functions linked.


link is a incremental/dynamic link facility: this command allows to add new compiled Fortran or C routines to Scilab executable code. Linked routines can be called interactively by the function call. Linked routines can also be used as "external" for e.g. non linear problem solvers (ode, optim, intg, dassl...).

link() returns a string matrix with linked functions.

a call to link returns an integer which gives the id of the shared library which is loaded into Scilab. This number can then be used as the first argument of the link function in order to link additional function from the linked shared library. The shared library is removed with the ulink command.

A routine can be unlinked with ulink. If the linked function has been modified between two links, it is required to ulink the previous instance before the new link.

link('show') returns the current linked routines.

To be able to link routines in a system independent way, it is convenient to use the ilib_for_link utility function instead of link.

(Experienced) users may also link a new Scilab interface routine to add a set of new functions. See ilib_build and addinter functions.

Number of 'link' in a scilab session can be limited by the operating system. On Windows, you cannot load more than 80 dynamic libraries at the same time.


//Example of the use of ilib_for_link with  a simple C code
f1=['#include <math.h>'
    'void fooc(double c[],double a[],double *b,int *m,int *n)'
    '   int i;'
    '   for ( i =0 ; i < (*m)*(*n) ; i++) '
    '     c[i] = sin(a[i]) + *b; '


//creating the shared library: a Makefile and a loader are 
//generated, the code is compiled and a shared library built.

// display the loader.sce file which calls link
// load the shared library 
exec loader.sce;

// call the new linked entry point
// check
exec cleaner.sce;

See Also

  • ulink — unlink/unload a dynamically linked shared object
  • call — Fortran or C user routines call
  • external — Scilabオブジェクト, 外部関数またはルーチン
  • c_link — check if symbol loaded with dynamic link
  • addinter — new functions interface dynamic link at run time.
  • ilib_for_link — utility for shared library management with link
  • ilib_build — utility for shared library management
  • api_scilab — api_scilab はScilabメモリにデータを読み書きするための Scilabインターフェイスです
Report an issue
<< ilib_verbose Dynamic/incremental Link Supported and compatible compilers >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 13:58:35 CEST 2014