To use CGAL on the sun.cs.tamu.edu machine:
Uncompress the file /tmp/cgal-boost.tgz in your home directory
cd ~
tar zxf /tmp/cgal-boost.tgz
The previous command will create opt directory in your home. Inside, there are 4 directories: bin, include, lib and share.
The opt/include directory are the headers files for CGAL (version 3.4) and boost (version 1.40) and
the opt/lib contain the libraries for CGAL (dynamic) and boost (static and dynamic)
To compile code using CGAL, use the following Makefile:
# Makefile to compile code using CGAL
# Set CGAL_DIR to the directory where the cgal includes and libraries are
CGAL_DIR=${HOME}/opt
INCLUDES += -I${CGAL_DIR}/include
LIBS += -L${CGAL_DIR}/lib -lCGAL -lboost_thread -lgmp -lmpfr
CFLAGS += -O3 -frounding-math
CPP = g++
%: %.cc
${CPP} ${CFLAGS} ${INCLUDES} ${LIBS} -o $@ $<
Write your code and save it with extension .cc (e.g. simple_demo.cc) and run
make simple_demo
to compile the code.To run your previous compiled program, define the LD_LIBRARY_PATH environment variable to $HOME/opt/lib
export LD_LIBRARY_PATH=$HOME/opt/lib