[vtkusers] Tcl_EvalFile never returns TCL_OK
Ravi Kiran Jonnadula
ravijo at hotmail.com
Sat Jul 24 22:47:03 EDT 2004
Hi,
I 'm trying to user Tcl_Eval and Tcl_EvalFile. But those calls never return
TCL_OK.
Here is the code and the output I 'm getting.
Please help me identify what might be wrong here.
thanks,
===========================================
code:
int main(int argc, char *argv[])
{
Tcl_Interp *interp;
int code;
char filename[] = "./test.tcl" ;
interp = Tcl_CreateInterp();
code=Tcl_Eval(interp,"info library");
if ( code != TCL_OK )
{
printf("Interp check: returned:%d, result=%s \n",
interp->result) ;
}
code = Tcl_EvalFile(interp, "/usr/lib/tcl8.3/init.tcl") ;
if ( code != TCL_OK )
{
printf ("code=%d, result=()\n", code, interp->result) ;
}
if (code != TCL_OK) {
exit(1);
}
exit(0);
}
========================
result:
Interp check: returned:134520856, result=Øúÿ¿w1
@
code=1, result=()
=========================
More information about the vtkusers
mailing list