next up previous contents index
Next: Namespaces and Interaction with Up: Technical Information Previous: Static Libraries for Borland   Contents   Index

Subsections

DLL's for Borland C++

This section describes the installation and usage of dynamic link libraries (DLL's) of LEDA with Borland C++ (bcc32 version 5.5.1 and 5.6).


Remark: This section describes the situation in a GUI package of LEDA. If you have the geometry, graph, or basic package only the corresponding libraries are provided.

Preparations

To install LEDA you only need to execute the LEDA distribution file LEDA-<ver>-<package>-win32-<compiler>.exe. During setup you can choose the name of the LEDA root directory and the parts of LEDA you want to install.

Then you have to set the environment variable LEDAROOT as follows:

  1. Windows NT/2000/XP: On these platforms LEDARROOT is set automatically to the directory where you installed LEDA by the setup program.

  2. Windows 95/98:
    1. Add the line set LEDAROOT=<LEDA> to the file "autoexec.bat" where <LEDA> is the root directory of your LEDA installation, e.g., D: \LEDA-4.4 \
    2. Restart Windows 95/98 for the change to take effect.

Files and Directories

To compile and link your programs with LEDA, the LEDA main directory should contain at least the following files and subdirectories:
Readme.txt Readme File
Install \win32_bcc_dll.txt txt-version of this section
incl \ the LEDA include directory
man_html \ HTML version of the LEDA user manual
and the following dll/library set

Note: A DLL of GeoWin is currently not available.

Compiling and Linking Application Programs

(a) Setting the Environment Variables for Borland C++:

(b) Compiling and Linking Application Programs:

Now you can use the LEDA libraries as follows to compile and link your application programs. We use <LEDA> to indicate the root directory of your LEDA installation, e.g., c: \LEDA-4.4 \.

Programs using basic data types:

bcc32 -DLEDA_DLL -P -I<LEDADIR>\incl -L<LEDADIR> prog.c leda.lib
Programs using GeoWin:
bcc32 -DLEDA_DLL -P -I<LEDADIR>\incl -L<LEDADIR> prog.c\
libGeoW.lib leda.lib

Remark: The option -P is necessary if the C++ source code files have extension .c. If your files have extension .cpp this option is not necessary.

Example programs and demos

The source code of all example and demo programs can be found in the directory <LEDA> \test and <LEDA> \demo. Goto <LEDA> and type make_test or make_demo to compile and link all test or demo programs, respectively.


next up previous contents index
Next: Namespaces and Interaction with Up: Technical Information Previous: Static Libraries for Borland   Contents   Index
root 2007-03-08