first previous next last contents

Runtime Loading of Libraries

The main command for loading dynamic libraries is the load_package command. This adds on a new directory to the Tcl search path and dynamically loads up a new C library. For programmers, the procedure of creating these libraries is initially fairly complex. Once done, all the user requires is a single load_package command adding to the application `rc' file to extend the applications functionality.

The existing Tcl package system allows for the dynamic loading to be delayed until a command is needed. However this system does not satisfactorily deal with the case where libraries contain only C commands. Hence the package system utilised by the Staden Package dynamically links in libraries to the running executable at the time of the load_package call. This is typically done in the startup phase of programs.



first previous next last contents
This page is maintained by staden-package. Last generated on 1 March 2001.
URL: http://www.mrc-lmb.cam.ac.uk/pubseq/manual/scripting_4.html