[Scilab-users] Using intersci... solved, sort of

shorne at energetiq.com shorne at energetiq.com
Fri Aug 9 21:41:18 CEST 2013


Followup to this note:
===
I've recently installed 5.4.1 running on linux mint debian, "olivia".   I 
posted recently about issues related 
to keyboard focus when running on a headless server via ssh -Y.  I found a 
workaround and am struggling on. 
I cannot figure out how to get dynamic linking to work as it used to. 
===

I figured out the dynamic linking intersci issues.
The short answer is, use the skeleton toolbox 
scilab-5.4.1/contrib/toolbox_skeleton
as a sample.

There are various things to figure out -- the trickiest was this -- 
Intersci may not be officially supported, but it's there if you turn on 
the support.
You have to use intersci  manually (or maybe there's some other hack to 
the makefile?)
and it only makes c language interfaces - which is fine.
The generated code won't compile unless you utter a particular incantation 
-- 
the "setenv" line below.  toradiali.c is the code generated by intersci.
My code is toradial.f.

(If you want to see how painful it is to do this the "new" way, poke 
around in the toolbox,
and look at the various interface routines.
Also this was somewhat useful... obviously a lot of work to write.  Thank 
you Michael.
 
http://perso.telecom-paristech.fr/~blanchet/FCFD/Scilab/docs/sciextensions-v0.2.pdf 
 )


builder_gateway_fortran.sce:
===
// This file is released under the 3-clause BSD license. See COPYING-BSD.

function builder_gw_fortran()
    setenv("__USE_DEPRECATED_STACK_FUNCTIONS__","YES");
libname="sfhtst1"  ; // library name
names=  ["fortran_sum","sci_fsum"; "toradial","intstoradial"]; // 
subroutine, interface pairs
files=["sci_fsum.c","toradiali.c"] ; // The interface sources, maybe?
  tbx_build_gateway(libname,names,files, ..
                  get_absolute_file_path("builder_gateway_fortran.sce"), 
..
                  ["../../src/fortran/libfsum"]);
endfunction

builder_gw_fortran();
clear builder_gw_fortran; // remove builder_gw_fortran on stack
===
The "tbx_* routines copy everything to TMPDIR so that's where you look to 
see what's going on.

Since the .desc file that interface.sci uses to generate the c code seems 
to completely define the interface,
I do hope that the swig solution that is threatened for version 6 
will use that file as input .

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20130809/719a2655/attachment.htm>


More information about the users mailing list