Readme.txt | Readme File |
Install/unix.txt | txt-version of this section |
incl/ | the LEDA include directory |
libleda.a (libleda.so) | the LEDA library |
The static library has the extension .a. If a shared library is provided it has extension .so.
To install and use the Unix object code of LEDA you have to modify your environment as follows:
csh/tcsh: | setenv LEDAROOT <LEDA> |
sh/bash: | LEDAROOT=<LEDA> |
export LEDAROOT |
CC (g++) -I$LEDAROOT/incl -c file.cpp
CC (g++) -L$LEDAROOT file.o -lleda -lX11 -lXft -lm
When using graphics on Solaris systems you might have to link with the system socket library and the network services library as well:
CC (g++) ... -lleda -lX11 -lXft -lsocket -lnsl -lmRemark: The libraries must be given in the above order.
CC (g++) -I$LEDAROOT/incl -L$LEDAROOT file.c -lleda -lX11 -lXft -lm
When using the multi-threaded version of LEDA you also have to set the flags LEDA_MULTI_THREAD and pthread during compilation (-DLEDA_MULTI_THREAD -pthread) and you have to additionally link against the pthread library (-pthread). You may want to ask your system administrator to install the header files and libraries in the system's default directories. Then you no longer have to specify header and library search paths on the compiler command line.
Important Remark: When using g++ version 4.x.x with optimization level 2 (-O2) or higher, you should always compile your sources setting the following flag:
-fno-strict-aliasing