Boost logo

Boost Users :

From: Welson Sun (welson_sun_at_[hidden])
Date: 2005-01-11 17:28:19


Doug Gregor wrote:

>
> On Jan 11, 2005, at 1:38 PM, Welson Sun wrote:
>
>> Hi,
>>
>> My platform is Linux (Fedora Core 2), gcc version: gcc (GCC) 3.3.3
>> 20040412 (Red Hat Linux 3.3.3-7)
>>
>> I need to read and write the ATT graphviz format, so this is what I did:
>>
>> 1. Generated the libbgl-viz library.
>> In boost_1_32_0/libs/graph/src/ directory, use the default
>> Makefile, generated the libbgl-viz library without error. And I
>> copied them to /usr/local/lib
>>
>> 2. g++ boost_1_32_0/libs/graph/example/graphviz.cpp, but I got
>> the nasty error:
>>
>>
>> ccVhyZaG.o(.text+0x602):graphviz.cpp:
>> undefined reference to `boost::read_graphviz(std::basic_string<char,
>> std::char_t
>>
>> [snip error]
>> collect2: ld returned 1 exit status
>>
>>
>> What's the matter?
>
>
> Add -lbgl-viz to the end of your "g++" command line to link in the
> GraphViz reader code.
>
> Doug
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
OK, I think the library is all right, because I just copied the code
from boost_1_32_0/libs/graph/doc/write-graphviz.html to a C++ file, and
it compiled and ran pretty well. So I think the problem is that the
example code : boost_1_32_0/libs/graph/example/graphviz.cpp is wrong in
the way it calls read_graphviz().

By the way, I just set LD_LIBRARY_PATH to /usr/local/lib, and when
compiling, I didn't add any compile options.

Welson


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net