Can Scilab Compile A Dmg File

Previous versions of Scilab are not maintained anymore. Bug fixes, new developments and support only happen on the 5.5.2 version and - preferably - on the version 6 family.We strongly advise you to upgrade to these versions. However, if you really need earlier versions, you can find them below.

Scilab 5.1.1
Binaries

Dec 08, 2011 I tried using Matlab Coder to generate C code from my matlab code. I found that for some sort of functions such as 'plot'. We need to call them as the Matlab extrinsic function which means still we need Matlab on the computer to run the standalone executable file.

Sources
Compilation prerequirements
Scilab 5.2.2
Binaries
Sources
Compilation prerequirements
Scilab 5.3.3
Binaries
Sources
Compilation prerequirements
Scilab 5.4.1
Binaries
Sources
Compilation prerequirements
Scilab 5.5.0
Binaries
Sources
Compilation prerequirements
Scilab 5.5.1
Binaries
Sources
Compilation prerequirements
Scilab 5.5.2
Binaries
Sources
Compilation prerequirements
Scilab 6.0.0
Binaries
Sources
Scilab 6.0.1
Binaries
Scilab 6.0.2 sources
Sources
Compilation prerequirements

Please note that the recommended version of Scilab is 6.1.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> call_scilab API (Scilab engine) > Compile and run with Call Scilab

How to compile a native application based on or using Scilab

Compilation

To compile a native code based on Call Scilab, it is necessary to define some arguments, variables and paths.

  • CFLAGS. Call Scilab needs to have access to the headers of Scilab core and call Scilab module.

    • Linux/Unix/MacOSX:

      • In the binary version of Scilab, CFLAGS must be set to /path/to/scilab/include/scilab/core/ and /path/to/scilab/include/scilab/call_scilab/

      • In the source tree of Scilab, CFLAGS must be set to /path/to/scilab/modules/core/includes/ and /path/to/scilab/modules/call_scilab/includes/

    • Windows

  • LD_LIBRARY_PATH - Paths to libscilab.so and libjavasci.so (or .dll, .jnilib...)

    • Linux/Unix/MacOSX:

      • In the binary version of Scilab, SCI will point to /path/to/scilab/lib/scilab/

      • In the source tree of Scilab, SCI will point to the root of the source tree /path/to/scilab/modules/call_scilab/.libs/ and /path/to/scilab/.libs/

  • LDFLAGS - The name of the library to link against

    • Linux/Unix/MacOSX: It is only mandatory to link against scilab. This should include the other libraries.

The following example is a Makefile to build against Scilab binary

The following example is a Makefile to build against Scilab source tree

Running

To run an application based on Call Scilab, there are a few other things to set up.

Some global variables must me set:

  • SCI - Path to Scilab files

    • Linux/Unix/MacOSX:

      • In the binary version of Scilab, SCI will point to /path/to/scilab/share/scilab/

      • In the source tree of Scilab, SCI will point to the root of the source tree /path/to/scilab/source/tree/

    • Windows:

  • LD_LIBRARY_PATH - Paths to libscilab.so and libjavasci.so (or .dll, .jnilib...)

    • Linux/Unix/MacOSX:

      • In the binary version of Scilab, SCI will point to /path/to/scilab/lib/scilab/

      • In the source tree of Scilab, SCI will point to the root of the source tree /path/to/scilab/modules/javasci/.libs/ and /path/to/scilab/.libs/

  • LD_LIBRARY_PATH (Java) - Paths to Java native libraries (libjava.so, libjvm.so, libhpi.so)... It is usually provided by the operating system or by Scilab distribution. Please note that won't be necessary in Scilab 5.2

    • Linux/Unix:

      • JAVA_HOME/jre/lib/<arch>/, JAVA_HOME/jre/lib/<arch>/server, JAVA_HOME/jre/lib/<arch>/native_threads/ (<arch> can be i386, etc...)

    • Mac OS X:

    • Windows

Can

Note that two environnement variables are taken in account for specific needs:

  • SCI_DISABLE_TK=1 Disables Tk (Tcl's GUI)

  • SCI_JAVA_ENABLE_HEADLESS=1 Launch Java in headless mode (no AWT/Swing)

Examples

See Also

Can Scilab Compile A Dmg File Software

  • api Scilab — api_scilab is the Scilab interface to read/write data from/to Scilab memory
  • call_scilab — call_scilab is an interface which provides the ability to call Scilab engine from C/C++ code
  • StartScilab — Initializes and starts Scilab engine in Call Scilab
  • SendScilabJob — Send a Scilab task from a C/C++ code (call_scilab)
  • SendScilabJobs — Send Scilab tasks from a C/C++ code (call_scilab)
  • Double Management — How to manage Scilab's variable read and write process using call_scilab and api_scilab
  • Boolean Management — How to manage Scilab's boolean read and write process using call_scilab and api_scilab
  • Complex Management — How to manage Scilab's complex variable read and write process using call_scilab
  • String Management — How to manage Scilab's String read and write process using call_scilab and api_scilab