Recently I have migrated tcl version 8.4 used in a C/C++ based tool to tcl 8.6.6. I am trying below command:
clock format [clock seconds] -format "%Y-%m%d-%H%M"
its resulting in error that clock.tcl: no such file or directory. More info on tool: tool has integrated tcl interpreter within it to provide a tcl shell for the execution.
Note: command [clock seconds] works fine.
Any help is much appreciated.
Recently I have migrated tcl version 8.4 used in a C/C++ based tool to tcl 8.6.6. I am trying below command:
clock format [clock seconds] -format "%Y-%m%d-%H%M"
its resulting in error that clock.tcl: no such file or directory. More info on tool: tool has integrated tcl interpreter within it to provide a tcl shell for the execution.
Note: command [clock seconds] works fine.
Any help is much appreciated.
Share Improve this question asked Mar 6 at 9:13 crazyMindscrazyMinds 371 silver badge2 bronze badges1 Answer
Reset to default 0Some parts of the clock
command are implemented in a script in Tcl's internal script library in 8.6. In particular, the formatting and parsing subcommands (clock format
and clock scan
) are implemented that way (as a compilation scheme). That script is called clock.tcl
and should be present in all Tcl installations.
It seems to be absent in yours. That means you have a broken installation; it is missing some of its essential parts, and the clock
command might not be the only affected one. Putting the missing files in the right place (as siblings to init.tcl
) will fix things.
Tcl 9.0 changes how the binding of the support files is done so this ought to be a thing of the past, though that will depend on exact build options...