C ++调用Scilab Engine:Tcl初始化失败

问题描述

我正在构建一个调用Scilab引擎的应用程序,以执行某些功能。当我这样做时,会发生以下错误

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 !

有什么想法吗? 您可以在下面找到整个c ++文件。谢谢。

#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) == 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;
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)