Re: Tcl program runs but blows up on tclkit

Pat Thoyts <[email protected]> Mon, 13 Apr 2009 10:38:15 +0100
Newsgroups gmane.comp.lang.tcl.starkit
Message-ID <[email protected]>
2009/4/11 John Culleton <[email protected]>:
>
> I have an embryo starkit which is frustrating me. When I cd
> to  ~/tyro.vfs/lib/tyro-app
> directory and run
> wish tyro.tcl
> it runs fine. In that directory
>  is tyro.tcl of course and a subprogram named newindex which
> is called by tyro.tcl. This subprogram is a compiled
> executable and not a tcl program.
> But when I run
> tclkit tyro.vfs/main.tcl
> it starts up OK, shows the tk graphic window,  and begins
> operating but at some point in the execution it cannot find
> the called program newindex.
> I put three executable copies of newindex in
> ~/tyro.vfs/
> ~/tyro.vfs/lib
> and
> ~tyro.vfs/lib/tyro-app/
> but the tyro.tcl progam can't find any of them.

If you try to run an executable you are asking the operating system to
locate the image, load it into memory and begin execution. The system
cannot know anything about Tcl's virtual filesystem and therefore
cannot load an image from it.
You must copy such images out of the vfs and into some location on the
native filesystem and run them from there. /tmp or $env(TEMP) is best.

Pat Thoyts