Time-stamp: Notes on compiling hindex There are two components to hindex. One is a set of functions written in C++ (mostly simple C) and the other are the Tcl/Tk functions. It is the C++ portion that needs to be compiled. It is compiled as a shared library, which may be called from Tcl/Tk. Properly it is referred to as a Tcl/Tk extension. Compiling from C++ source requires the (http://www.gnu.org/software/gsl) GNU Scientific Library, which is a freely available library that contains numerical functions used by hindex (e.g., minimization and root-finding methods). It also requires Tcl/Tk development files. On OS X, I compile the extension with the following command: g++ -Wall -dynamiclib -DUSE_TCL_STUBS tcl_hindex.C -Wno-long-double \ -L/sw/lib -I/sw/include -framework Tcl -o libhindex.dylib -lgsl \ -lgslcblas -lm This assumes that the GNU Scientific Library was installed from fink (http://fink.sourceforge.net/) and Tcl/Tk is Tcl/Tk Aqua (http://tcltkaqua.sourceforge.net/). On linux, I compile the extension with the following command: g++ -Wall -shared -DUSE_TCL_STUBS tcl_hindex.C -o libhindex.so \ -lgsl -lgslcblas -lm -ltclstub8.4 On a 64-bit linux system I had to add -fPIC to the options. Once compiled, the extension can be called from Tcl/Tk in various ways. In the distributed binaries, it is called from the graphical user interface that is created by hindex.tcl. However, in its simplest form is could be called from a simple tclsh (assuming the library and the input files are in the same directory as where the tclsh is launched). $ tclsh % load libhindex[info sharedlibextension] % hindex parental.txt individual.txt output.txt For the binary distributions, I have packaged the extension, various libraries and text files in a way that hides complexity from the user. For linux, the file is a starpack and therefore can be unpacked and examined with tools for starkits and starpacks (see http://www.equi4.com/starkit.html). For Mac OS, so that the program has its own icon and displays its own name in the menu bar, I packaged it as a typical OS X application package. Thus, it can be examined by control- or right-clicking on the application icon and selecting 'Show Package Contents'. I followed the suggestions for packaging that I found at http://www.wordtech-software.com/tcl-bundle-tutorial.html.