2
// Demo file for ext12f example
5
// builder code for ext12f.c
7
link_name = 'ext12f'; // functions to be added to the call table
9
flag = "f"; // ext12f is a C function
11
files = ['ext12f.o' ]; // objects files for ext12f
13
libs = []; // other libs needed for linking
16
// the next call generates files (Makelib,loader.sce) used
18
// for compiling and loading ext12f and performs the compilation
21
ilib_for_link(link_name,files,libs,flag);
22
generate a loader file
23
generate a Makefile: Makelib
27
// load new function code in the scope of call
29
// using the previously generated loader
33
// generated by builder.sce: Please do not edit this file
35
// ------------------------------------------------------
37
ext12f_path=get_file_path('loader.sce');
39
link(ext12f_path+'/libext12f.so',['ext12f'],'f');
40
Loading shared executable0./libext12f.so
51
// test new function through the ode function
53
//same example as # 10 with call to matptr
55
//param must be defined as a scilab variable
58
param=[0.04,10000,3d+7];
60
y=ode([1;0;0],0,[0.4,4],'ext12f');