JaneAndrews
Programmer
Hi all,
I am very new to Tcl programming world.
I am trying to implement a TCL command in C.
Before that I wanted to try out a small experiment given in a book. But I am getting an access violation when I invoke Tcl_EvalFile. If I use Tcl_Eval with same command, then it works just fine. Somebody please help me.
Thanks a lot in advance.
This is the code:
int main()
{
Tcl_Interp *myInterp;
int retCode;
char name[] = "./simple.tcl";
myInterp = Tcl_CreateInterp();
retCode = Tcl_EvalFile(myInterp, name);
if(retCode != TCL_OK)
fprintf(stdout, "Error\n");
getchar();
return 1;
}
contents of simple.c are : puts Hello.
I am very new to Tcl programming world.
I am trying to implement a TCL command in C.
Before that I wanted to try out a small experiment given in a book. But I am getting an access violation when I invoke Tcl_EvalFile. If I use Tcl_Eval with same command, then it works just fine. Somebody please help me.
Thanks a lot in advance.
This is the code:
int main()
{
Tcl_Interp *myInterp;
int retCode;
char name[] = "./simple.tcl";
myInterp = Tcl_CreateInterp();
retCode = Tcl_EvalFile(myInterp, name);
if(retCode != TCL_OK)
fprintf(stdout, "Error\n");
getchar();
return 1;
}
contents of simple.c are : puts Hello.