I had rebuilt my library using bjam because I needed a 32
bit Linux build(while on a 64 bit machine).
I built the libraries and linked them into my project.
I was attempting to use my local boost files, but I get an error referring to
another boost include directory which is a different version. I don’t
specify the path being referred to in my link steps anywhere, so I’m
assuming my build with bjam didn’t specify a necessary define.
The error I see is: main.o(.gnu.linkonce.t._ZN5boost15program_options25basic_command_line_parserIcEC1EiPPc+0x53):
In function
`boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int,
char**)':
/usr/include/boost/program_options/detail/parsers.hpp:42:
undefined reference to
`boost::program_options::common_command_line_parser::common_command_line_parser(std::vector<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > >
const&)'
Where it refers to
/usr/include/boost/program_options/detail/parsers.hpp while my intent was to
use BOOST_ROOT=/home/dpieczynski/opt/libs/BOOST/boost_1_34_1/lib32
To build the library I defined BOOST_ROOT, then ran “./configure
-prefix=lib32 -includedir=/home/dpieczynski/opt/libs/BOOST/boost_1_34_1”
The library was then built with:
bjam cxxflags=-m32 linkflags=-m32 cflags=-m32
architecture=x86 address-model=32 -d2 link=shared --prefix=lib32
threading=multi debug install –a
What needs to be done to prevent the reference to
/usr/include/boost?
Thanks for your time and help.
Dan Pieczynski