Weird TCL behavior on Cygwin/MinGW
"export TCL_LIBRARY=$(cygpath -w /usr/share/tcl8.4)"hack). But the execution just seems to vanish after a call to Tcl_Init(). Now internally, Tcl_Init parses a whole load of stuff, starting from init.tcl.
Also tried a weird hack that changes the "tclPreInitScript" variable to help set the $tcl_library variable, et al. But nothing helped.
On debugging the executable in gdb, the call to Tcl_Init returns a segfault, which is not visible on a normal run.
The solution to this mystery is a simple call to
"Tcl_FindExecutable(argv)", which sets up some internal variables for use by tcl. Now since in cygwin there are two paths (the /usr type path and the /cygdrive/usr path) for all resources, this helps initialise everything correctly. I almost did'nt try this solution.
But it works!!!