Re: [ANN] critcl v3 and other news

Dave <use@xxxxxxxxxxxxxxxxxxxxxx> writes:

On 10/17/2011 10:42 PM, Andreas Kupries wrote:

Some news regarding Jean-Claude Wippler's venerable "C Runtime In
Tcl" package and application, short "critcl".

Very long post... sorry.

Win7x64, ActiveTcl 64-bit

Tried to install per instructions. I wanted to install everything in
the Temp/ directory and try it out.

Note that the location I gave also has a link to a critcl starkit for

Here's what I got after starting a
windows command shell in the directory (jcw-critcl-e1d3dc7) created
when unpacking the sources:

Installed package: C:/Users/imdave/AppData/Local/Temp/CriTcl/critcl3
Installed package:

couldn't open "C:/Users/imdave/AppData/Local/Temp/bin/critcl": no
such file or directory
while executing
"open $dsta/critcl w"
(procedure "_install" line 48)
invoked from within
"_install C:/Users/imdave/AppData/Local/Temp/CriTcl"
("eval" body line 1)
invoked from within
"eval _$argv"


OK, so I have to make a "bin" directory:

To be fixed in build.tcl

My tests usually either did not specify a directory, or explicitly
pointed into a Tcl installation, meaning that all the directories were
present already in both cases.


So now it's "installed". Run it:

C:\Users\imdave\AppData\Local\Temp>tclsh bin/critcl

So now it seems that I should be able to run it.

I next changed to the examples/clist directory in the source
distribution since it looked like it was the easiest to try.

I did a "tclsh build.tcl"
It started a GUI
I specified "." as the install directory
It failed -- the last message seemed to indicate that it could not

exec "cl.exe"

You have MSVC installed, or the Platform SDK ?
And the directory containing the compiler (cl.exe) is in the PATH ?

Nevermind, I see the next steps you took.

Should update the documentation, that a working compiler is expected.

Also, the GUI hung, I had to use task manager to kill the tclsh.exe process

Not sure how that came about. I'll have a look.
Hm. Were the buttons in the GUI disabled ?
It should not happen, the 'Install' procedure catches errors and
reactivates all buttons regardless, including 'Exit', which simply
calls Tcl's 'exit' command.

I've installed Visual Studio Express 10.0
There were several cl.exe's that I found

Likely for the various architectures supported by the VSE, like 32bit
intel, 64bit intel, itanium, etc.

After a little googling, I created this init.bat file:

set TCLLIBPATH={C:/Program Files/Tcl/lib/tcl8.5} {C:/Program
Files/Tcl/lib} {c:/program
files/tcl/lib/teapot/package/win32-x86_64/lib} {c:/program
call "C:\Program Files (x86)\Microsoft Visual Studio
tclsh build.tcl

It started a GUI
I specified "." as the install directory again

Seems that I should [file normalize] the path, to make it independent
of whatever changed to the CWD happen latter. Just in case. Not sure
at this point if that would be a fix.

It failed. Here's the Tcl error trace:

error renaming "./clist": no such file or directory
error renaming "./clist": no such file or directory
while executing
"file rename $ldir/$p $ldir/$p$version"

That is where it tries to move the generated package into the selected
destination directory. That is fairly late in the process, after
compilation and linking.

.... Now knowing that the link phase failed the package dir hierarchy
was not made, and that is likely the issue at hand. However, it would
be better if the code would not try to install anything with the
linking failed. That I have to make better.

Here's what was shown in the GUI:

[elided the ok parts].

1792 bytes


ERROR while linking
LINK : fatal error LNK1181: cannot open input file 'bufferoverflowU.lib'
child process exited abnormally

Yes. The configuration for Windows 64 bit assumes that bufferoverflowU.lib
is required for proper linking, and accessible.

Can you check your VSE installation, if it contains that library ?

And if yes, if the "vcvarsall.bat" actually exports the directory it
is in ?

I will cross-check this with my system tomorrow. That one uses the
Platform SDK, and I know that the library in question is there.

critcl build failed
(FAILED) Files left in
FAILED: <<Bracket>>

There was a BUILD directory created with two .obj files, link.fil, and
a tcl8.5 directory -- so I guess the cl.exe worked


Finally, my request:

Would it be possible to either point me to or provide an extremely
simple/basic "hello world" type of example with all the steps laid out
for a total newby?

Thank you.

Well, that is what I wanted to provide with the examples. Obviously
that did not work out that well :(

Tomorrow, when I am back in the office, I will use my windows hosts
and work through the issues, fixing the build.tcl scripts, updating
documentation, etc. As far as I can. The bufferoverflowU.lib I am not
sure about yet. I know that my Win64 system has it around somewhere,
asnd the linker is able to find it.

So long,
Andreas Kupries <akupries@xxxxxxx>
Developer @ <>
18'th Annual Tcl/Tk Conference: 2011, Manassas, VA USA

Relevant Pages

  • Errors applying kernel patch 118833-36
    ... install of Solaris 10 11/06. ... However, once the package list is done, I see a worrisome message: ... Below is the complete console output of the patch run. ... Changes for package SUNWnfsskr will not be applied to the system. ...
  • Re: tile package provide
    ... My first, most earnest, and sincere suggestion - install ActiveTcl ... I came across the Tile package because I just installed ActiveTcl on ... TCL has the nice feature that the code does not have to be compiled, ...
  • Re: tile package provide
    ... My first, most earnest, and sincere suggestion - install ActiveTcl ... I came across the Tile package because I just installed ActiveTcl on ... TCL has the nice feature that the code does not have to be compiled, ...
  • Re: SmartMenu - was: VRPC on a USB pen
    ... in applications distributed via package systems which are supposed to ... having to get the user to install it, or they could present the user ... Haskell compiler and associated tools (collectively referred to on ... as the 'platform' package). ...
  • Re: Stronghelp - can I change location set by Packman?
    ... it was needed to install a package though. ... RISC OS desktop. ... Simpler for the newbies arriving from Linux, ...