Hi,<br> I use Scilab version 4.1.2on a linux plateform (Ubuntu 8.04 - Hardy Heron - )<br>Merci<br>stf<br><br><div class="gmail_quote">2008/5/29 Sylvestre Ledru <<a href="mailto:sylvestre.ledru@inria.fr">sylvestre.ledru@inria.fr</a>>:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br>
<br>
Which version of Scilab are you using ? On which platform ?<br>
<br>
Regards,<br>
Sylvestre<br>
<br>
Le jeudi 29 mai 2008 à 17:55 +0200, Stéphane Paris a écrit :<br>
<div><div></div><div class="Wj3C7c">> Hi,<br>
> I'd like using ilib_for_link function with C function build_in. So I'm<br>
> trying the help example bellow :<br>
> f1=['int ext1c(n, a, b, c)'<br>
> 'int *n; double *a, *b, *c;'<br>
> '{int k;'<br>
> ' for (k = 0; k < *n; ++k) '<br>
> ' c[k] = a[k] + b[k];'<br>
> ' return(0);}'];<br>
><br>
> mputl(f1,'fun1.c')<br>
><br>
> //creating the shared library (a gateway, a Makefile and a loader are<br>
> //generated.<br>
><br>
> ilib_for_link('ext1c','fun1.o',[],"c")<br>
><br>
> // load the shared library<br>
><br>
> exec loader.sce<br>
><br>
> //using the new primitive<br>
> a=[1,2,3];b=[4,5,6];n=3;<br>
> c=call('ext1c',n,1,'i',a,2,'d',b,3,'d','out',[1,3],4,'d');<br>
> if norm(c-(a+b)) > %eps then pause,end<br>
><br>
> Loading the sce file, gives me this error :<br>
> in execstr instruction called by :<br>
><br>
> generate a loader file<br>
> generate a Makefile: Makelib<br>
> running the makefile<br>
> compilation of fun1<br>
> building shared library (be patient)<br>
> /usr/bin/ld: crti.o: No such file: No such file or directory<br>
> collect2: ld returned 1 exit status<br>
> make: *** [<a href="http://libext1c.la" target="_blank">libext1c.la</a>] Error 1<br>
> !--error 10000<br>
> unix_s: error during ``make -f Makelib <a href="http://libext1c.la" target="_blank">libext1c.la</a>''<br>
> execution<br>
> at line 56 of function unix_s called by :<br>
> line 29 of function ilib_compile called by :<br>
> line 29 of function ilib_for_link called by :<br>
> ilib_for_link('ext1c','fun1.o',[],"c")<br>
> line 13 of exec file called by :<br>
> exec("/media/sda1/STF_STUFF/ProjetLivre/figures/testLink.sce");<br>
> in execstr instruction called by :<br>
><br>
> I believe i've tried this long time ago, and it works well.<br>
> Is there anybody knowing the answer to this pb ?<br>
> stf<br>
<br>
</div></div></blockquote></div><br>