## -*-Text-*- # ################################################################### # CppTcl - a C++ Tcl object integration system # # FILE: "README" # created: 1/4/96 {9:03:24 pm} # last update: 13/12/96 {1:00:53 am} # Author: Vince Darley # E-mail: # mail: Division of Applied Sciences, Harvard University # Oxford Street, Cambridge MA 02138, USA # www: # # ################################################################### ## Cpptcl Version 1.20 =================== In order of priority, this is what Cpptcl does: The primary purpose of Cpptcl is to allow you to write C++ classes which smoothly, simply and powerfully link with the Tcl language, and expose as much or little of their interface to Tcl as desired (member functions and data members). Object creation, destruction and manipulation are all supported from Tcl. A secondary goal is to allow you to take existing C++ classes and automatically wrap them inside other 'Tcl-aware' C++ classes so that it appears to the Tcl user as if your original class is integrated with Tcl. A tertiary goal is to allow you to take either of the above forms of C++ in Tcl object functionality and wrap such an item inside an [incr Tcl] class. This occurs at the Tcl rather than C++ level, although needn't look any different to the user. For demonstration classes and tutorial material, look in the 'Demo' directory. Technical Documentation (including some material relating to the demonstration classes) is online at: Suggestions, improvements and feedback are always welcome. ------------------------------------------------------------------------ Installation: There is currently no sophisticated installation procedure. I have no desire to learn about clever configure scripts and stuff like that, but if you wish to contribute one, I'll happily include it. You must first download and install Tcl7.6 (or newer) from Sun microsystems at ftp.smli.com. I'd suggest you download itcl2.2 and use that instead, since the object oriented features of itcl are probably going to be required if you want to use any of the scripts I write to handle C++ objects in Tcl. However, currently itcl is not _required_ to use the Cpptcl package, and it will happily load into either variety of tcl interpreter. Itcl will be required to use any graphical capabilities of this or the 'EvoX' package. Installation (also see the Important Notes below): * edit the file 'configMake.in' to reflect the paths you use. * chmod u+x configure * ./configure * make * copy 'pkgIndex.tcl' (or copy its contents) to the directory where shared libraries are stored. * create a directory 'cpptcl1.2' at the same level as the tcl7.6, tk4.2 library directories in your hierarchy. Move the contents of 'library' to that location (or alternatively, just make a link from 'library' to 'cpptcl1.2' in the right location). * make sure your 'CPPTCL_LIBRARY' environment variable is set to the location of the above directory That's it. It's curretly set up for Solaris 5.5, and to build shared libraries. After building as above, you'll be left with two shared libraries. These can be loaded into a plain tcl interpreter via either: 'load libCpptcl.so', 'load libCpptclextra.so' or with the 'package require' command. For the latter you must move the file 'pkgIndex.tcl' to somewhere on your tcl 'auto_path', or copy its contents to another file which is. For MacOS, un-compress the file 'Mac.sit.hqx' using stuffIt expander, and read the instructions in there. If you'd prefer static libraries, do 'make staticLibs', or switch a comment in the top level makefile. If both static and shared libraries exist, I don't know which are linked to preferentially! There are a few useful sample scripts in the library directory, but there is no need to install these if you don't want them. =============================================================================== Important Notes: --------------- ¥ If you use gcc2.7.2, you'll get a large number of warnings from a file "info_pretender.h". If you want to get rid of these, you must remove '-Wall', otherwise you'll have to wait till gcc2.8.0 when I'm told there will be a switch to remove these warnings. ¥ For documentation, see the CppTcl and EvoX web page on: ¥ You must use 'gmake', not make. ¥ Currently the shared libraries are set up to link with a bunch of g++'s libraries (libg++, libiostream,..). I found this necessary else I got undefined symbols on 'load'ing in Tcl. But on some systems this will not be required. Also note I never got dynamic loading of C++ things working properly in Tcl on SunOS 4.1.3 (and judging by the number of posts on this topic to comp.lang.tcl, nor has anyone else), so I switched to Solaris.