Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2007-07-16 04:33:45


Chandan Nilange wrote:
> Hello,
>
> I have boost_1_32 version installed at
> /usr/include/boost
> Also, I have installed boost_1_34 at another
> path:/home/myname/work/boost/boost_1_34_0/
>
> Now when I try to run with 1_34 version, it still
> points to 1_32 version at /usr/include (this is
> observed when I debug using gdb it refers to
> /usr/include/boost/regex/v4/match_results.hpp:118)
>
> I tried following things:
>
> 1]
> export
> LD_LIBRARY_PATH=/home/myname/work/boost/boost_1_34_0/boost:$LD_LIBRARY_PATH
> export
> PATH=/home/myname/work/boost/boost_1_34_0/boost:$PATH

Looks right.

> 2]
> I am using following command for compilation
> g++ -c -g -I/home/myname/work/boost/boost_1_34_0/boost
> ${TEST_FILES_PATH}/${TEST}.c
> g++ ${TEST}.o -L/home/myname/work/boost/lib
> -lboost_regex

Looks right: you could double check by checking the value of BOOST_VERSION
in your code, and verifying that libboost_regex.so is present in
/home/myname/work/boost/lib.

> 3] I am including boost header in ${TEST}.c as below
> #include "boost/regex.hpp"

Also looks right.

Basically you have three things to double check:

1) Compile time, that the right headers are included.
2) Link time, that you're linking against the right library.
3) Run time, that LD_LIBRARY_PATH is set right.

Personnally if I were a better man, I'd put a bet on #2, but that's just a
guess :-)

HTH, John.


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