Recently I've been using freewrapTCLSH to produce executables from Tcl/Gnocl scripts running on my OpenSuse workstation. Because FreeWrap doesn't rely upon any pre-installed interpretor to find any installed Gnocl modules, these are typically included in the same directory with the executable and accessed by using either the 'load' command for *.so files or 'source' for *.tcl. Not wanting to have too many spare copies of shared modules and packages floating around on my file system, I worked out a way of accessing packages installed in their usual locations (ie. under /usr/lib/tcl/) hence the following routine. When called using the familiar 'package require Gnocl 0.9.94', the exisiting Tcl installation will be examined for the needed packages. If these are not present,then the directory containing the executable itself will be searched. If the module cannot be found anywhere, the program will terminate.
Tutorial Pages >