call tcl from c

#include <stdio.h>
#include <tcl.h>

main (int argc, char *argv[]) {

        Tcl_Interp *myinterp;
        int status;

        printf ("Your Tcl Program will run ... \n");

        myinterp = Tcl_CreateInterp();
        status = Tcl_EvalFile(myinterp,argv[1]);

        printf ("Your Tcl Program has completed\n");
}

posted @ 2011-09-25 23:42  greencolor  阅读(152)  评论(0编辑  收藏  举报