Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

How does the function Tcl_FindExecutable work


hi everybody anyone can help me out of the question

echo.sj wrote:
> hi everybody anyone can help me out of the question

The implementation of Tcl_FindExecutable() is:

void Tcl_FindExecutable(const char *argv0)
{
    TclInitSubsystems();
    TclpSetInitialEncodings();
    TclpFindExecutable(argv0);

}

Which should give you an overview of what it does.
What part are you interested in more detail about?

DGP

On Jun 2, 11:01 pm, Don Porter <dgpor@verizon.net> wrote:

thanks you.
I wrote a c++ program using tcl as below.
int main(int argc, char *argv[])
{
        Tcl_FindExecutable(argv[0]);
        Tcl_Interp *pTclInterp = Tcl_CreateInterp();
        if(!pTclInterp)
        {
                printf("Tcl Interpreter could not be created.\n");
                return 0;
        }
        if (Tcl_Init(pTclInterp) != TCL_OK) {
            printf("Tcl Interpreter could not be initialized.\n");
            return 0;
        }
        Tcl_Eval(pTclInterp," puts \"Hello ,world !\"");

        Tcl_Eval(pTclInterp,"package require snack");
        printf("%s\n", Tcl_GetString(Tcl_GetObjResult(pTclInterp)));
        Tcl_Eval(pTclInterp,"sound s -file m1.wav");
        printf("%s\n", Tcl_GetString(Tcl_GetObjResult(pTclInterp)));
        Tcl_DeleteInterp(pTclInterp);
        return 0;

}

If I want to run the program in other platform without tcl
environment,I should install tcl first.And I want to know how the tcl
works and the dependencies betweens tcl packages,so I can minimize a
tcl enviroment.And I want to know how it works when a Tcl_Eval
function is invoked?

echo.sj wrote:
> If I want to run the program in other platform without tcl
> environment,I should install tcl first.

Ah, the "real question" is revealed.

This is a solved problem.  Google for "starkit".

DGP

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc