Discussion:
Problem referencing libraries in tcl 8.6, e.g. fileutil
SImon Conway-Smith
2018-08-07 15:56:35 UTC
Permalink
I have added the tcl intepreter into my Cygwin (64-bit) installation, but
when trying to run some code samples using the fileutil library, e.g. the
foreachLine command, I'm getting 'invalid command name
"fileutil::foreachLine"'. I've even tried prefixing the command with "tcl::"
as I had to do for the mathfunc:: library functions, but still get the error
message. Is there an additional tcl package I need to install, or what?



--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
cyg Simple
2018-08-07 16:52:34 UTC
Permalink
Post by SImon Conway-Smith
I have added the tcl intepreter into my Cygwin (64-bit) installation, but
when trying to run some code samples using the fileutil library, e.g. the
foreachLine command, I'm getting 'invalid command name
"fileutil::foreachLine"'. I've even tried prefixing the command with "tcl::"
as I had to do for the mathfunc:: library functions, but still get the error
message. Is there an additional tcl package I need to install, or what?
It seems that tcllib isn't installed with Cygwin's tcl.

$ tclsh
% package require fileutil
can't find package fileutil
%

Since tcllib is pure tcl with no compilation required you can download
it directly from https://www.tcl.tk/software/tcllib/ and install it into
the /usr/lib/tcl8.6/ directory.
--
cyg Simple

--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Marco Atzeri
2018-08-07 16:58:05 UTC
Permalink
Post by SImon Conway-Smith
I have added the tcl intepreter into my Cygwin (64-bit) installation, but
when trying to run some code samples using the fileutil library, e.g. the
foreachLine command, I'm getting 'invalid command name
"fileutil::foreachLine"'. I've even tried prefixing the command with "tcl::"
as I had to do for the mathfunc:: library functions, but still get the error
message. Is there an additional tcl package I need to install, or what?
fileutil is part of tcllib that is not provided as cygwin package

The last upstream version is located at
https://sourceforge.net/projects/tcllib/files/tcllib/1.19/

It includes an installer written in TCL

$ ./installer.tcl
Installing Tcllib 1.19
You have chosen the following configuration ...

Packages: /usr/lib/tcllib1.19
Applications: /usr/bin
Examples: /usr/bin/tcllib_examples1.19
Documentation:

NROFF: /usr/man/mann
HTML: Not installed.

Is the chosen configuration ok ? y/N:

Disclaimer: I have not tested the installer as I know nothing of TCL

Regards
Marco



---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus


--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Simon Conway-Smith
2018-08-09 18:26:38 UTC
Permalink
Marco,

This worked. Thank you.

I have to remember to add the line...
% package require fileutil
...at the start of a tcl script though. I'll get used to it 😊

-----Original Message-----
From: Marco Atzeri <***@gmail.com>
Sent: Tuesday, August 7, 2018 5:58 PM
To: ***@cygwin.com
Subject: Re: Problem referencing libraries in tcl 8.6, e.g. fileutil
Post by SImon Conway-Smith
I have added the tcl intepreter into my Cygwin (64-bit) installation,
but when trying to run some code samples using the fileutil library,
e.g. the foreachLine command, I'm getting 'invalid command name
"fileutil::foreachLine"'. I've even tried prefixing the command with "tcl::"
as I had to do for the mathfunc:: library functions, but still get the
error message. Is there an additional tcl package I need to install, or what?
fileutil is part of tcllib that is not provided as cygwin package

The last upstream version is located at
https://sourceforge.net/projects/tcllib/files/tcllib/1.19/

It includes an installer written in TCL

$ ./installer.tcl
Installing Tcllib 1.19
You have chosen the following configuration ...

Packages: /usr/lib/tcllib1.19
Applications: /usr/bin
Examples: /usr/bin/tcllib_examples1.19
Documentation:

NROFF: /usr/man/mann
HTML: Not installed.

Is the chosen configuration ok ? y/N:

Disclaimer: I have not tested the installer as I know nothing of TCL

Regards
Marco



---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple

Loading...