[scilab-Users] Run C code function in Scilab

KLUGESHERZ, CHRISTIAN (CHRISTIAN) christian.klugesherz at alcatel-lucent.com
Thu Jul 22 10:56:56 CEST 2010


Many thanks Bernard

It seems I took the wrong way.
Ok I will try with your recommendation.

Again a point.
What with could be good, if I could include the c file name directly in scilab function, rather to include the c code between '...'

like
f1=['int ext1c(int *n, double *a, double *b, double *c)'
    '{int k;'
    '  for (k = 0; k < *n; ++k) '
    '      c[k] = a[k] + b[k];'
    '  return(0);}'];


Christian

-----Message d'origine-----
De : bernard.hugueney at scilab.org [mailto:bernard.hugueney at scilab.org] 
Envoyé : jeudi 22 juillet 2010 10:22
À : users at lists.scilab.org
Objet : Re: [scilab-Users] Run C code function in Scilab


Hello ,

On Thu, 22 Jul 2010 09:59:44 +0200, "KLUGESHERZ, CHRISTIAN (CHRISTIAN)"

<christian.klugesherz at alcatel-lucent.com> wrote:

> Hello all, 

> There is now a long time that I try to link a simple c code to scilab. 

> My goal is not to create a toolbox, just a simple function written in C

> that I want to call with scilab. 

[...]

> 

> But I don't know if it is the right way to try to integrate the 

> example csum.c and csum.h that we can find in 

> C:\Program Files\scilab-5.3.0-beta-1\contrib\toolbox_skeleton\src\c 

> 



If you do not want to create a toolbox but just link and execute

some compiled C code, I think you should rather look at 

"Dynamic/incremental Link " section of the manual[0],

 e.g ilib_for_link [1].



Best Regards,



Bernard



[0]

http://www.scilab.org/product/man/section_eb691bc0a443eb3a95bc5db4d1be2102.html

[1] http://www.scilab.org/product/man/ilib_for_link.html



More information about the users mailing list