1
ilib_build Scilab Group Scilab Function ilib_build
3
ilib_build - utility for shared library management
6
ilib_build(lib_name,table,files,libs [,makename])
8
lib_name : a character string, the generic name of the library without
11
table : 2 column string matrix giving the table of pairs
12
'scilab-name', 'interface name'
14
files : string matrix giving objects files needed for shared library
17
libs : string matrix giving extra libraries needed for shred
20
makename : character string. The path of the Makefile file without
24
This tool is used to create shared libraries and to generate a loader
25
file which can be used to dynamically load the shared library into
26
Scilab with addinter Many examples are provided in
27
examples/interface-tour-so directory.
30
//Here with give a complete example on adding new primitive to Scilab
31
//create the procedure files
32
f1=['extern double fun2();'
35
'{*y=fun2(*x)/(*x);}'];
39
f2=['#include <math.h>'
42
'{ return( sin(x+1.));}'];
45
//creating the interface file
46
i=['#include ""stack-c.h""'
47
'extern int fun1 _PARAMS(( double *x, double *y));'
54
' GetRhsVar(1, ""d"", &m1, &n1, &l1);'
55
' fun1(stk(l1),stk(l1));'
61
//creating the shared library (a gateway, a Makefile and a loader are
64
files=['fun1.o','fun2.o','intfun1.o'];
65
ilib_build('foo',['scifun1','intfun1'],files,[]);
67
// load the shared library
71
//using the new primitive
74
addinter, link, ilib_compile, ilib_gen_Make, ilib_gen_gateway,
75
ilib_gen_loader, ilib_for_link