From: Steve C. <ste...@mq...> - 2002-02-11 06:17:45
|
We're making use of the tcl binding just now. I'm wondering why it doesn't use namespaces, eg AG::CreateAG rather than AG_CreateAG? Is it too late to change this now, it would be useful to us in one respect, we're creating a version of the API that stores undo information for certain operations and having the API as a namespace might make it easier to override the API calls we want to save undo info for. Secondly, the tcl wrapper doesn't install itself very nicely, I should be able to say 'package require AG' to load the library. I've begun to work out how to do this but I'm having trouble comprehending the build system and where the locations of libraries are specified. Basically to make things work in the Tcl Way the package should be installed in a subdirectory adjacent to the tcl installation (eg /usr/local/lib/ag) looking like this: ag/ ag.tcl pkgIndex.tcl ag_tcl.so * at the moment the .tcl and .so files go in /usr/local/lib. Since the .so files depend on other shared libraries (agf_tcl.so etc) then having them in /usr/local/lib isn't unreasonable but it does make the whole thing a little messy. How hard (and desirable) would it be to combine the libraries into a smaller number of shared objects. Perhaps a core libag.so and then the language bindings libag_tcl.so libag_python.so etc. Since libag.so gets linked against C++ code it would go in the standard lib directory, the others could go where the scripting language could find them. There might also be an option to combine the lot into one shared object. Then, when I'm shipping a package based on AGLIB, the number of files and their interdependancies is minimised. I don't know automake/libtool well enough to know how to make this happen. I'm happy to help with code etc. to make the tcl package neater and more useable. Steve |