I have a tcl script to be called within a C program. I use the system(tcl_script_file) to execute it. The call returns successfully, but the script is never executed. What is the right way to run a Tcl script from within a C program. By the way, the script will take in one argument. I run the script manually, and it works fine.
Here is the code segment:
int status;
sprintf(cmdstr, "/export/home/user9/trans/file.tcl %s", filename);
status = system(cmdstr);
//status always equals to 0, meaning the execution is successful.
Is that right to run a tcl script? If not, what is the right way to do this?
Thanks a ton!!!
Fox12
Here is the code segment:
int status;
sprintf(cmdstr, "/export/home/user9/trans/file.tcl %s", filename);
status = system(cmdstr);
//status always equals to 0, meaning the execution is successful.
Is that right to run a tcl script? If not, what is the right way to do this?
Thanks a ton!!!
Fox12