# `read_graphviz`

    (1)
    void read_graphviz(const std::string& file, GraphvizDigraph& g);
    (2)
    void read_graphviz(FILE* file, GraphvizDigraph& g);
    (3)
    void read_graphviz(const std::string& file, GraphvizGraph& g);
    (4)
    void read_graphviz(FILE* file, GraphvizGraph& g);

This is to read a file in AT&T graphviz format into a BGL graph. The type of the BGL graph has to be either `GraphvizDigraph` or `GraphvizGraph`. You need build the `libbglviz.a` library and link the library into your program properly.

### How to build library `libbglviz.a`

set `CXX` to be your compiler command. For example(in tcsh shell):

    setenv CXX "g++ -ftemplate-depth-100 -Wno-long-long"

or (in bash shell):

    export CXX="g++ -ftemplate-depth-100 -Wno-long-long"

Assume your boost top directory is `boost_X_XX_X`, then

    cd boost_X_XX_X/libs/graph/src
    $CXX -I../../../ -I. -c *.cpp
    ar -rc libbglviz.a *.o
    ranlib libbglviz.a

Note that for some compilers, the process to build libraries is slightly different. You should follow your compiler manual. For example, to use Kuck and Associates C++ compiler to build the library:

    KCC +K0 --one_instantiation_per_object -I../../../ -I. -c *.cpp
    KCC +K0 --one_instantiation_per_object -o libbglviz.a *.o

### Example

The example in `example/graphviz.cpp` demonstrates using the BGL read graphviz facilities.

### See Also

`write_graphviz`

Copyright © 2000-2001 | Lie-Quan Lee, Indiana University (llee@cs.indiana.edu) Jeremy Siek, Indiana University (jsiek@osl.iu.edu)