4
//[1] call intersci with Makefile
8
V=G_make('ex17fi.c','ex17fi.c');
10
//[2] run the builder generated by intersci.
12
// Since files and libs were nor transmited
14
// to intersci we give them here
16
files = ['ex17fi.o','ex17c.o'];
20
exec ex17fi_builder.sce
22
// generated with intersci
24
ilib_name = 'libex17fi' // interface library name
30
table =["ex17","intsex17"];
32
ilib_build(ilib_name,table,files,libs);
33
generate a gateway file
34
generate a loader file
35
generate a Makefile: Makelib
40
//[3] run the loader to load the interface
42
// Note that the file loader.sce
44
// is changed each time you run a demo
46
// if several0.desc are present in a directory
50
// generated by builder.sce: Please do not edit this file
52
// ------------------------------------------------------
54
libex17fi_path=get_file_path('loader.sce');
59
addinter(libex17fi_path+'/libex17fi.so','libex17fi',functions);
60
Loading shared executable0./libex17fi.so
71
//[4] test the loaded function
73
L=list('poo',[10,20],[%t,%f]);
78
if L1(1)<>L(1) then bugmes();quit;end
80
if norm(L1(2)-L(2)) > 1.e-8 then bugmes();quit;end
82
if L1(3)<>L(3) then bugmes();quit;end