The VFLib library is distributed in source format, packed and
compressed in a .tar.gz
or in a .zip
format file.
This means that the first step
for installation is to unpack the archive, but probably you have already
done this, if you are reading this documentation!
Now, you have to compile the library, which requires a C++ compiler.
The library has been developed under the Linux operating system, using
the egcs
compiler. However, the code does make use only of standard
C++ features, so it should work on other operating systems with any recent
compiler.
For Unix systems like Linux we have provided a Makefile that automates the
compilation process. You need to edit the file Makefile
in order to set the name of your compiler and the relevant compile options
(the file provided assumes that the compiler is invoked as g++
and
enables full code optimization); after that you only have to issue the
command make
to build the library.
This will produce a library file named libvf.a
in the lib
subdirectory. You will need to link this library to your programs
for using the graph matching library.
You must also remember, when compiling C++ files that use
the library, to add the include
directory, created when unpacking
the library archive, to the compiler include path.
For example, suppose you have a file named my_prog.cc
which
makes use of the library, and suppose that you have unpacked
and built VFLib under the directory
/usr/local/vflib/
.
Then the command to produce an object file my_prog.o
would be:
where the
g++ -c -I/usr/local/vflib/include my_prog.cc
-c
flag tells the compiler to stop after producing
the object file, and the -I
flag adds the specified directory
to the include path.
The command to produce an executable would be:
where the
g++ -o my_prog my_prog.o -L/usr/local/vflib/lib -lvf -lstdc++ -lm
-o
flag specifies the name of the executable
(the default would be a.out
), the -L
flag adds the
lib
directory to the library search path, and the three
-l
flags indicate the libraries to link to the program
(-lvf
represents the VFLib library file).
In section Using VFLib: a quick tour you will find some example programs that make use the library.
If you use a non-Unix system, please refer to your compiler
documentation (or ask a local guru) for building the library
and linking it to your programs. Notice that on some compilers
it may be necessary to change the source filenames extension
from .cc
to .cpp
to compile them in C++ mode (as opposed
to C).