Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Running standalone scilab application under windows

1,989 views
Skip to first unread message

velk...@yahoo.com

unread,
Aug 18, 2007, 2:09:03 PM8/18/07
to
Hello,
I am new to Scilab and don't seem to be able to find enough relevant
info on the topic.

How can I compile Scilab application program to run standalone in
Windows ?
In other words, is there a way to make an .exe output from Scilab ?

Thanks.

philippe...@free.fr

unread,
Aug 19, 2007, 11:46:09 AM8/19/07
to

Hi,

there is many ways to exec Scilab in standalone mode.
Two of them are :
1-Run Scilab in batchmode like this "C:\Program Files\scilab-4.1.1\bin
\scilex" -nw -f MonScript.sce
2-Have a look at this directory : "scilab-4.1.1\examples\callsci
\callsciC++" to learn HowTo use Scilab embedded in an C++ application.

hope this helps

<a href="http://philippe.matthieu.free.fr/serendipity/"
title="Matt'">a+ Matt'</a>

velk...@yahoo.com

unread,
Aug 19, 2007, 1:41:26 PM8/19/07
to

What I have done, is to have Excel Visual Basic for Applications (VBA)
macro
call a process/program which is some program written in Visual C and
compiled into windows .exe,
let me call it myProgram.exe.
Than the process executes some math code inside myProgram.exe and
returns automatically to Excel.

What I need to do now is, instead of Visual C .exe, I have to do the
same thing but with code written in Scilab using some Scilab math
functions, and call
myProgram.sci.

I have the hardest part - process calling - figured out.
Under windows, in the VBA macro, I simply have a line such as
some_return_variable = ExecCmd ("myProgram.exe")
which causes the myProgram.exe to execute.

I guess, I do not understand if *.sci or *.sce can execute without
Scilab.
1) Does Scilab have to be started first to execute these files ?

2) Could I do simply ExecCmd ("myProgram.sci") same way as I did
before with myProgram.exe ?

My problem is that this application will be run on a PC without
Scilab, so I can not have the program start scilex
because it will not be there. Even if the user had Scilab installed, I
would not want Scilab to pop up either.


Thanks for any suggestions,
velkypivo

Thomas Baier

unread,
Aug 22, 2007, 5:05:32 AM8/22/07
to
Velkypivo,

velk...@yahoo.com wrote:
> On Aug 19, 10:46 am, philippe.matth...@free.fr wrote:

>> On 18 aoűt, 20:09, velkyp...@yahoo.com wrote:
>>
>>> Hello,
>>> I am new to Scilab and don't seem to be able to find enough relevant
>>> info on the topic.
>>> How can I compile Scilab application program to run standalone in
>>> Windows ?
>>> In other words, is there a way to make an .exe output from Scilab ?
>>> Thanks.
>> Hi,

>> [...]


> What I have done, is to have Excel Visual Basic for Applications (VBA)
> macro
> call a process/program which is some program written in Visual C and
> compiled into windows .exe,
> let me call it myProgram.exe.
> Than the process executes some math code inside myProgram.exe and
> returns automatically to Excel.

Another option would be using R/Scilab (D)COM Server available from
http://rcom.univie.ac.at/

Using this software, your application will have access to Scilab in form
of a COM object. The Scilab window itself is not visible.


> What I need to do now is, instead of Visual C .exe, I have to do the
> same thing but with code written in Scilab using some Scilab math
> functions, and call
> myProgram.sci.
>
> I have the hardest part - process calling - figured out.
> Under windows, in the VBA macro, I simply have a line such as
> some_return_variable = ExecCmd ("myProgram.exe")
> which causes the myProgram.exe to execute.
>
> I guess, I do not understand if *.sci or *.sce can execute without
> Scilab.
> 1) Does Scilab have to be started first to execute these files ?

Using R/Scilab (D)COM Server, you will have to instantiate the COM
component and initialize the component. This is similar to starting
Scilab---just without of the windows...


> 2) Could I do simply ExecCmd ("myProgram.sci") same way as I did
> before with myProgram.exe ?
>
> My problem is that this application will be run on a PC without
> Scilab, so I can not have the program start scilex

You will need Scilab to be installed on the computer in order to use the
component from R/Scilab (D)COM Server, but you can do this silently for
the user when installing your own application.


> because it will not be there. Even if the user had Scilab installed, I
> would not want Scilab to pop up either.

This is how the COM component works. No GUI, no windows just plain
Scilab backend functionality.

Thomas

jsi...@gmail.com

unread,
Aug 23, 2007, 12:42:41 PM8/23/07
to
Ideally, I think Velkypivo wanted to be able to write a program in
Scilab and have people run it who do not have Scilab installed.
Thomas' method might be the closest he can get to that, but I have a
different idea, and was wondering if it's possible.

Does scilab have any feature where one can easily convert Scilab code
into Fortran/C/C++ code? I imagine that not all functionality would
be supported, but it would still be a lot easier to write programs,
and if one could easily switch to a compiled language than re-
compiling the code might allow other users to run the program.

Possible/impossible/wrong/thoughts?


Enrico Segre

unread,
Aug 23, 2007, 4:38:12 PM8/23/07
to
> Does scilab have any feature where one can easily convert Scilab code
> into Fortran/C/C++ code?

short answer: NO.

There is an ancient and never finished, currently broken attempt of
Fortran translator currently built in, and there are rumors that a
decent scilab->C translator is planned for scilab 5.

Enrico

velk...@yahoo.com

unread,
Aug 24, 2007, 3:39:55 PM8/24/07
to

How about using Scilab's DLL libraries ? I think, calling Scilab DLL
from VB would be easier.
Are Scilab DLLs ready to be called from C or VB ?
Is there a list of these DLLs ?

Thanks,
velkypivo

0 new messages