Release 0.9, June 1997
http://www.cs.ruu.nl/CGAL/and go to the `Software' section. Just follow the instructions on this page to obtain your copy of the library. The CGAL library can also be downloaded using FTP. The library can be found at the following location:
ftp.cs.ruu.nlin the directory /pub/CGAL. This directory contains release 0.9 of the CGAL library. There is also a README file that contains descriptions of the files in this directory. An example of an FTP-session is given below.
$ ftp ftp.cs.ruu.nl Name (ftp.cs.ruu.nl:<your username>): anonymous Password: <type your email address here> ftp> cd pub/CGAL ftp> get README ftp> binary ftp> get CGAL-0.9.tar.gz ftp> quit
operating system | compiler |
IRIX 5.3 | SGI Mips C++ 4.0 |
IRIX 6.2 | SGI Mips C++ 7.1 |
IRIX 5.3 | GNU g++ 2.7.2 |
SUN Solaris 2.5 | SUN Pro C++ 4.1 |
SUN Solaris 2.5 | SUN Pro C++ 4.2 |
SUN Solaris 2.5 | GNU g++ 2.7.2 |
unzip <filename>.zipand for the gzipped file use the commands
gunzip <filename>.tar.gz tar xvf <filename>.tarIn both cases the directory CGAL-0.9 will be created. This directory contains the following subdirectories:
directory | contents |
doc_html | documentation (HTML) |
doc_ps | documentation (PostScript) |
examples | example programs |
include | header files |
lib | (shared) object libraries |
make | files with platform dependent makefile settings |
src | source files |
install_cgalin the CGAL-0.9 directory. The script can be run in two modes: a menu-driven interactive mode (default) and a non-interactive mode. You should use the non-interactive mode only if there happen to be problems with the interactive mode.
The installation of CGAL is done in three steps. First you have to make some choices (which compiler, is LEDA used, etc.). Then the script will generate makefiles, based on these choices. Finally, the CGAL libraries are compiled.
install_cgal -ni <compiler>where <compiler> is the full path to the compiler, e.g. /usr/local/bin/g++. Before you do this, you have to enter a number of variables manually at the beginning of the script. These are:
LEDA_EXT= LEDA_INCL_DIR= LEDA_LIB_DIR= STL_STATUS= STL_DIR= CGAL_STL_VERSION= GCC_RTTI_PATCH_EXT= GCC_RTTI_PATCH_DIR=See the documentation in the script for the values you can enter here. After running the script a makefile will be generated in the CGAL-0.9/make directory. In the non-interactive mode the CGAL libraries will not be compiled automatically. To do this go to the src directory. Then type make -f makefile_lib to compile the CGAL object library and make -f makefile_sharedlib to compile the CGAL shared object library. If you want to make changes to the makefiles first, see here for an explanation of the makefile structure of CGAL.
When this is finished it would be a good idea to print and read the `Getting Started with CGAL' document that can be found in the doc_ps directory.
WARNING. If you want to use the compiler GNU g++ 2.7.2, or if you want to use LEDA in combination with CGAL, there are some compatibility issues that need to be addressed first. See here and here for more information about this.
All these makefiles are generic: they can be used for more than one platform. To achieve this, the first section of each makefile contains an include statement that looks as follows:
CGAL_MAKEFILE = /users/jannes/CGAL-0.9/make/makefile_<extension> include $(CGAL_MAKEFILE)
The file CGAL_MAKEFILE is an include file with platform dependent makefile settings. The abbreviation <extension> is used to identify the operating system and compiler for which the settings hold. For example, the file makefile_mips_IRIX_5.3_CC_4.0 contains makefile settings for the IRIX 5.3 operating system and the SGI MIPSpro C++ 4.0 compiler. These include files are generated by the install script and they are all located in the CGAL-0.9/make directory. If you want to compile an application or an object library for a different platform, the only thing you need to do is select another include file from this directory.
The three makefiles also contain sections with compiler and/or linker flags. You may add your own flags here. For example, you might want to add the flag -DCGAL_NO_PRECONDITIONS to turn off precondition checking. The flags $(CGAL_CXXFLAGS) and $(CGAL_LDFLAGS) should never be removed.
The default extension for CGAL source files is .C. The last section of the makefiles contains a suffix rule that tells the compiler how to create a .o-file from a .C-file. If you want to use the default rule that is defined by the make utility, you may want to remove this suffix rule. However, note that it may then be necessary to also rename the makefile variables CGAL_CXX and CXXFLAGS.
Unfortunately, there is a conflict between most STL implementations and LEDA 3.4/3.5. The type bool is in STL usually defined as int, which is prohibited by LEDA. If you are going to use LEDA and CGAL together, you have to resolve this problem somehow. There are two approaches: modifying the file bool.h of STL (which is the easiest solution) or modifying the file <LEDA/bool.h>. For more information about this see the file CGAL-0.9/include/CGAL/bool.h.
If you do not want (or if you do not have the possibility) to install this patch, the compiler flag -D_STDEXCEPT will be set to avoid a name conflict when including the file <math.h>. When you don't install the patch you will not be able to use fstreams, since this will make the programs crash! Note that there may be several other problems.
The install script tries to find out which STL is used. This is necessary to work around some limitations and bugs. In case the right version is not recognised, you can fill it in in the script or in the makefiles generated by the script. The variable CGAL_STL_VERSION can take the following values:
CGAL_STL_GCC | STL version that comes with gcc-2.7.2 |
CGAL_STL_HP | Free HP version |
CGAL_STL_SGI_WWW | Free new SGI implementation |
CGAL_STL_SGI_WWW_OLD | Free SGI implementation for older compilers |
CGAL_STL_SGI_WWW_OLD | Free SGI implementation for older compilers |
CGAL_STL_SGI_CC | SGI implementation that comes with their 7.x compilers |
CGAL_STL_WITH_ITERATOR_TRAITS | STL implementation that relies on iterator traits |
Most STL libraries consist of only header files. An exception is HP's STL, which also has source files random.cpp and tempbuf.cpp. The generated makefiles do not take care of this.