next up previous contents index
Next: DLL's for Borland C++ Up: Technical Information Previous: DLL's for MS Visual   Contents   Index

Subsections

Static Libraries for Borland C++

This section describes the installation and usage of static libraries 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_lib.txt txt-version of this section
incl \ the LEDA include directory
man_html \ HTML version of the LEDA user manual
and the following library set

Compiling and Linking Application Programs in a DOS-Box

(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 -P -I<LEDA>\incl -L<LEDA> prog.c libl.lib

Programs using graph data types:

bcc32 -P -I<LEDA>\incl -L<LEDA> prog.c libg.lib libl.lib

Programs using geometric data types:

bcc32 -P -I<LEDA>\incl -L<LEDA prog.c libp.lib libg.lib libl.lib

Programs using three-dimensional data types:

bcc32 -P -I<LEDA>\incl -L<LEDA> prog.c libd3.lib libp.lib libg.lib\
libl.lib

Programs using graphics data types:

bcc32 -P -I<LEDA>\incl -L<LEDA> prog.c libw.lib libp.lib libg.lib\
libl.lib wsock32.lib user32.lib gdi32.lib comdlg32.lib shell32.lib\
advapi32.lib

Programs using GeoWin:

bcc32 -P -I<LEDA>\incl -L<LEDA> prog.c libgeow.lib libd3.lib\
libw.lib libp.lib libg.lib libl.lib wsock32.lib\
user32.lib gdi32.lib comdlg32.lib shell32.lib advapi32.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: DLL's for Borland C++ Up: Technical Information Previous: DLL's for MS Visual   Contents   Index
root 2007-03-08