lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Here's what I did to get around this.  In src/lib/tklua.c, change the
following line:

  Tcl_Interp *interp = Tcl_CreateInterp();

to:

  Tcl_Interp *interp;
  
#ifdef _WIN32
  Tcl_FindExecutable(NULL);
#endif
  interp = Tcl_CreateInterp();

Please note that this is something of a hack, since calling
Tcl_FindExecutable with a NULL argument isn't strictly legitimate (and
will blow up on UNIX).  However, on Windows it will work and will fix
the problem you mentioned.

This seems to be needed on Windows as well as cygwin.  That's why I used
#ifdef _WIN32.

For more info see the "Tcl/Tk on Windows FAQ" at
http://www.pconline.com/~erc/tclwin.htm (item C-10) and the Tcl source
code.

Gordon


Daniel Perry wrote:
> 
>  I am still having some trouble using it. I integrated it into my normal
> lua.c file, but am getting a perculiar error when trying to use it:
>    C:\tklua\bin>tklua test1.lua
>    error: couldn't stat "": no such file or directory
>    error: unable to recover; exiting
>  This one, i compiled with cygwin's tcl/tk libraries, includes, everything.
> and it gives me that error.
>  -daniel