Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - Português

Change language to:
English - Français - 日本語 - Русский

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

Ajuda do Scilab >> Link Dinâmico/incremental > c_link


check if symbol loaded with dynamic link

Calling Sequence

[test, ilib] = c_link(routine_name)
test = c_link(routine_name,num)



a character string


number of the shared library where routine_name is searched (-1: default, last used)


boolean, indicates if there is a shared library which contains routine_name.


a scalar, the number of the shared library which contains routine_name


c_link is a boolean function which checks if the routine routine_name is currently linked. This function returns a boolean value true or false. When used with two return values, the function c_link returns a boolean value in test and the number of the shared library which contains routine_name in ilib (when test is true).

Examples (C code)

if haveacompiler() then
            f1=['int ext1c(int *n, double *a, double *b, double *c)'
            '{int k;'
            '  for (k = 0; k < *n; ++k) '
            '      c[k] = a[k] + b[k];'
            '  return(0);}'];
            mputl(f1, TMPDIR + '/fun1.c');
            //creating the shared library (a gateway, a Makefile and a loader are
            // load the shared library
            exec loader.sce;
            // show link
            [test, ilib] = c_link('ext1c') // check if 'ext1c' symbol is linked in scilab (it returns %T, ilib equals to 0)
            c_link('ext1c', -1) // check if 'ext1c' linked in scilab in current library (last used) (it returns %T)
            c_link('ext1c', 0) // check in library (id eqs 0) if 'ext1c' is linked (it returns %T)
            c_link('ext1c', 1) // 'ext1c' not in library with id = 1 (it returns %F)
            c_link('toto') // returns %F  'toto' not linked to scilab (it returns %F)

See Also

  • link — dynamic linker
  • fort — Fortran or C user routines call
  • api_scilab — api_scilab is the Scilab interface to read/write data from/to Scilab memory
Report an issue
<< addinter Link Dinâmico/incremental chooselcccompiler >>

Copyright (c) 2022-2023 (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:
Fri Apr 11 14:18:24 CEST 2014