Next: Namespaces and Interaction with
Up: Technical Information
Previous: Static Libraries for Borland
Contents
Index
Subsections
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.
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:
- Windows NT/2000/XP: On these platforms LEDARROOT is
set automatically to the directory where you installed LEDA by the setup
program.
- Windows 95/98:
- 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
\
- Restart Windows 95/98 for the change to take effect.
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
-
leda.dll,
leda.lib,
libGeoW.lib
Note: A DLL of GeoWin is currently not available.
- (a) Setting the Environment Variables for Borland C++:
-
- Make sure that that the directory containing bcc32.exe is
contained in your path. bcc32.exe is located in the
\bin subdirectory of your compiler
(, e.g., c:
\programs
\borland
\cbuilder6
\bin)
- Make sure that there is a file bcc32.cfg in the
\bin
subdirectory of your compiler which sets the compiler options
for the Include and Lib paths (-I and -L switches of
compiler). On the authors machine the following lines had to be added to
bcc32.cfg:
-I"c:
\programs
\Borland
\cbuilder6
\include"
-L"c:
\programs
\Borland
\cbuilder6
\lib"
- Make sure that there is a file ilink32.cfg in the
\bin subdirectory of your compiler which sets the
linker option for the Lib path. The author had to add the following line
to ilink32.cfg :
-L"c:
\programs
\Borland
\cbuilder6
\lib"
- (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.
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: Namespaces and Interaction with
Up: Technical Information
Previous: Static Libraries for Borland
Contents
Index
root
2007-03-08