[scilab-Users] ilib_for_link

Stéphane Paris stefane.paris at gmail.com
Fri May 30 10:03:05 CEST 2008


Hi,
I use Scilab version 4.1.2on a linux plateform (Ubuntu 8.04 - Hardy Heron -
)
Merci
stf

2008/5/29 Sylvestre Ledru <sylvestre.ledru at inria.fr>:

> Hello,
>
> Which version of Scilab are you using ? On which platform ?
>
> Regards,
> Sylvestre
>
> Le jeudi 29 mai 2008 à 17:55 +0200, Stéphane Paris a écrit :
> > Hi,
> > I'd like using ilib_for_link function with C function build_in. So I'm
> > trying the help example bellow :
> > f1=['int ext1c(n, a, b, c)'
> >     'int *n;     double *a, *b, *c;'
> >     '{int k;'
> >     '  for (k = 0; k < *n; ++k) '
> >     '      c[k] = a[k] + b[k];'
> >     '  return(0);}'];
> >
> > mputl(f1,'fun1.c')
> >
> > //creating the shared library (a gateway, a Makefile and a loader are
> > //generated.
> >
> > ilib_for_link('ext1c','fun1.o',[],"c")
> >
> > // load the shared library
> >
> > exec loader.sce
> >
> > //using the new primitive
> > a=[1,2,3];b=[4,5,6];n=3;
> > c=call('ext1c',n,1,'i',a,2,'d',b,3,'d','out',[1,3],4,'d');
> > if norm(c-(a+b)) > %eps then pause,end
> >
> > Loading the sce file, gives me this error :
> > in  execstr instruction    called by :
> >
> >    generate a loader file
> >    generate a Makefile: Makelib
> >    running the makefile
> >    compilation of fun1
> >    building shared library (be patient)
> >    /usr/bin/ld: crti.o: No such file: No such file or directory
> >    collect2: ld returned 1 exit status
> >    make: *** [libext1c.la] Error 1
> >  !--error 10000
> > unix_s: error during ``make -f Makelib libext1c.la''
> > execution
> > at line      56 of function unix_s called by :
> > line    29 of function ilib_compile called by :
> > line    29 of function ilib_for_link called by :
> > ilib_for_link('ext1c','fun1.o',[],"c")
> > line    13 of exec file called by :
> > exec("/media/sda1/STF_STUFF/ProjetLivre/figures/testLink.sce");
> > in  execstr instruction    called by :
> >
> > I believe i've tried this long time ago, and it works well.
> > Is there anybody knowing the answer to this pb ?
> > stf
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20080530/f09a411a/attachment.htm>


More information about the users mailing list