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 >> Dynamic/incremental Link > c_link


check if symbol loaded with dynamic link


[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
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Feb 12 20:08:51 CET 2018