You must use GNU C++ (i.e., g++) to compile LEDA programs. If not using linux, set the compiler with the CXX variable in the makefile:
CXX = g++GNU make understands foo.C or foo.cc as C++ programs. If you use some other suffix, the makefile example will need modification.
On the compiler command line, add the flag '-I/labs/cgm/include'. This is typically done in a Makefile using the CXXFLAGS variable. For example:
CXXFLAGS = -I/labs/cgm/include -O2
Also, on the linker command line, add the flag '-L/labs/cgm/lib', as well as any LEDA libraries required. This is typically done in a Makefile using the LDFLAGS and LDLIBS variables For example:
LDFLAGS = -L/labs/cgm/lib LDLIBS = -lL -lmFinally, you must specify which source files are combined to form the binary. The following example specifies two programs: foo is built from foo.C (by issuing the command make foo) and bar is built from bar.cc (make bar).
foo: foo.C bar: bar.ccThe LEDA is split into several separate libraries. Here is a quick synopsis of what to use in LDLIBS. See the LEDA manual (local access only) for more details.
use in LDLIBS for this functionality
------------- ----------------------
-lL -lm (basic data types)
-lG -lL -lm (graph data types)
-lP -lG -lL -lm (planar geometry)
-lD3 -lP -lG -lL -lm (3d geometry)
-lW -lP -lG -lL -lX11 -lm (windows)
Save the example Makefile described
in this document and use it as a starting point for your LEDA
projects.
Information on obtaining the current version of LEDA can be found on the LEDA web site.