Compiling Dalí


On Unix

Gcc and GNU make is required to compile Dalí (other compilers might work). In the unix subdirectory, run :

./configure --with-tcl-dir=TCLDIR --with-tcl-lib=TCLLIB --with-tclsh=TCLSH

where TCLDIR is the tcl parent directory where tcl.h and tcl library can be found, and TCLLIB is the name of the tcl library without the lib prefix and .a suffix. TCLSH is the executable name of Tcl Shell. For example, if tcl is installed under /usr/local/tcltk, you want to link with libtcl80.a, and you used tclsh80, then the command will look like :

./configure --with-tcl-dir=/usr/local/tcltk --with-tcl-lib=tcl80 --with-tclsh=tclsh80

The default values are

TCLSH tclsh
TCLDIR /usr/local/tcltk
TCLLIB tcl80

This will create a Makefile in the unix directory. To execute the Makefile, run :

make

This should compile the static libraries, dynamic libraries, and the DVM shell.  To install the binaries and libraries, run :

make install

This will run the Tcl script install.tcl.

On Win95/NT

Visual C++ 4.0 or 5.0 is required to compile Dalí on WIndows 95 or i NT. Make sure that your PATH includes DevStudio\Vc\bin. In the win subdirectory, run :

vcvars32
nmake /f makefile.vc

The first line sets various environment variables for VC++, the second makes Dalí. This should compile the static libraries, dynamic libraries and DVM Shell. Run

nmake /f makefile.vc install
install Dalí. This runs the Tcl Script install.tcl.

To use the Microsoft Developer's Studio with Dalí (the debugger is particularly useful), start the Developer's Studio,  program, Choose "Open Workspace..." in the File menu, and open the file win\makefile.vc.  You will be asked if you want to create a wrapper makefile (press the Yes button), and which platforms you want to compile for (use the default).  Choose the "Settings..." item in the "Project" menu, and adjust the following items:

Any changes to the makefile should be made to makefile.vc (I leave the files DevStudio creates alone).


Compiling and Running the Examples

These examples are available under examples subdirectory. To compile these examples :

On Unix
To compile all examples, type

make
To run the C examples, type
make test_c
To run the Tcl examples, type
make test_tcl
To run all C and Tcl examples, type
make test
You may also cd into individual example directory and type the above commands to compile and run individual example.

On Windows, replace make with nmake -f makefile.vc. You may need to changes makefile.vc to set the proper paths. The current Makefile.vc assumes your Microsoft VC++ and Tcl are installed in the default location (c:\program files\devstudio\vc and c:\program files\tcl) respectively.


Make changes to Makefiles or Adding Examples

Currently, the Makefiles are generated by a Tcl program called MakeMakefiles.tcl. It relies on Makefile.spec to tell him what examples are there, what libraries are needed to compile the examples, etc. The template for Makefile is Makefile.tmpl and for Makefile.vc is Makefile.vc.tmpl. Do not edit Makefile.vc/Makefile directly, edit the templates instead.

To generate the files, run

tclsh80 MakeMakefiles.tcl
These generates a new configure.in, and a new Makefile and Makefile.vc for each examples.

To add a new example, add a new line to Makefile.spec. Each line is a Tcl list consists of :


Last Updated :