

Help required in running a C program in scilab
Hi all,
I am new to Scilab and I need to know, " How to run a C program in Scilab". I have a C program statement and I need to run the same in Scilab, so that I can access the C code using Scilab. Help is appreciated. Thanks in advance.
Scilab


Please look at the following links- https://help.scilab.org/docs/6.0.0/en_US/ilib_build.html https://help.scilab.org/docs/5.4.0/en_US/call.html Do look at the suggested functions at the bottom of the page.


Hi Vijay_Karthik
Assuming you're running under a Linux-Like system (including MacOS), the way I'm doing that is simply by using the "host" function.
if your C program is called "myProgram" expecting two inputs let's say "a" & "b"
then something like
host('./myProgram a b')
should work.
Let us know


do you mean that the need is about adding somewhere in a C-code (not compiled) a statement ?
Please be more explicit.
thx
What I mean is if I have only a single statement, say "int a" (in terms of C code), how do I implement this statement in Scilab
Is there any function to implement such a statement
Login to add comment


look for me it depends if this statement has to be included in your code at the first line, after the last one. in which case I think it's easy.
however if it's about adding a statement inside (somewhere between line 2 & x) then it'll require some work (at least for me
please tell me that you're not running under windows things in which case I'm useless :-(
I am sorry, I am running in Windows
oops I'm sorry. then I just can't be of any help.
The reason is that Linux-like systems are much more appropriate for this kind of issues. Not saying that windows can't do, just that I don't know anything about MS Windows. Sorry
OK, anyways thanks for your help
Login to add comment


Hi all,
I somehow managed to link C files to Scilab. But right now the problem is when I try to use the c_link function for a particular routine name, its always showing False for any routine, even if the C file is linked to Scilab. Help is appreciated. Thanks in advance.


Hello,
Can anyone let me know how to link C routines in Scilab. Thanks in advance.
Login to add comment