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;
}