Linkable Tcl Library for embedding Tcl in "C" appications

libtclsh: Linkable Tcl Library for embedding Tcl in "C" appications


One glitch with embedding Tcl in a "C" application has been the need to have the Tcl libraries and ancillary scripts installed on the end-users system. This provides a weak link where an installation can become corrupted.

The memCode collection creates a libtclsh.a file that can be linked with an existing "C" application to make a single, standalone exe with no need for init.tcl, tk.tcl, pkgIndex files, etc.

It does this by creating an in-memory virtual file system for the Tcl support files. The files are compressed using the bzip2 algorithm, to reduce the memory load.

To further make life interesting, I've merged in Arjen Markus's FTCL package that lets you link Fortran and Tcl code so you can link the libftclsh.a library to a FORTRAN program and create a single-file FORTRAN based executable.

The current status of this is that it's working and in use, and still in development. It hasn't been pushed hard yet, and hasn't been used outside of my development environment.

Get the Code

Right here: memCode.8.20.tgz


It works for me. It might work for you.

If it doesn't work let me know, and I might have time to do something about it.

If you've figured out a fix, so much the better.

If it eats your goldfish, I'm sorry, but not responsible.