0

I'm building an application that will call the Scilab engine, in order to execute some functions. When I do that, the following error occurs.

Warning: Localization issue: Error while binding the domain from D:\Documents\HMMF/../locale/ or D:\Documents\HMMF/locale/: Switch to the default language (English).
Unable to find Tcl initialisation scripts.
Check your SCI environment variable.
Tcl initialisation failed !

Any ideas? You can find the whole c++ file below. Thank you.

#include <stdio.h>
#include <iostream>
//#include <string>

extern "C" {
    #include "api_scilab.h" /* Provide functions to access to the memory of Scilab */
    #include "call_scilab.h" /* Provide functions to call Scilab engine */
}

using namespace std;

//#define _MSC_VER


int main()
{
    /****** INITIALIZATION **********/

#ifdef _MSC_VER
    if (StartScilab(NULL, NULL, NULL) == FALSE)
#else
    if (StartScilab(getenv("SCI"), NULL, NULL) == FALSE)
#endif
    {
        fprintf(stderr, "Error while calling StartScilab\n");
        return -1;
    }
    /*
    */

    /****** ACTUAL Scilab TASKS *******/

    char job1[] = "exec('D:\Documents\HMMF\scilab_c_proxy\test-fun')";
    SendScilabJob(job1); // the argument must be char *    
    /*
    */

   /****** TERMINATION **********/
    if (TerminateScilab(NULL) == FALSE) {
        fprintf(stderr, "Error while calling TerminateScilab\n");
        return -2;
    }
   /* 
   */

    return 0;
}
Jason mav
  • 1
  • 1
  • It sounds as if some file is missing. It doesn't appear to be a standard Tcl init file (the characteristic error message is different) but rather something scilab-specific. – Donal Fellows Sep 07 '20 at 10:07
  • Is it possible to bypass the Tcl/Tk initialisation process maybe? I don't need the GUI, because I'm building a console app. – Jason mav Sep 08 '20 at 07:27

0 Answers0