如何解决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 举报,一经查实,本站将立刻删除。