Hi all,
I'm having newbie problems with linking against Boost libraries. Here's
the situation:
I can build the boost libraries without problem, and I'm using the
default toolkit for my system, (Fedora Core 1) which is g++.
Compiling is no problem, just linking. I can link the object files by
hand, but not as part of using Boost.build.
As a test, I grabbed an example program from the date_time library and
it's corresponding build rule. This code compiles fine as part of Boost,
but if I move it to my project space, I get linking errors.
Here's my Jamfile:
exe time_math : <lib>$(BOOST_ROOT)/build/boost_date_time
time_math.cpp
: <include>$(BOOST_ROOT)
<define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG ;
and here's my Jamrules in the same directory:
project-root ;
path-global BOOST_ROOT : "/opt/boost-1.30.2" ;
Here's the Jamfile from /opt/boost-1.30.2/libs/date_time/example/
exe time_math : <lib>../build/boost_date_time
posix_time/time_math.cpp
: <include>$(BOOST_ROOT)
<define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
;
And the environment variable is set:
BOOST_BUILD_PATH=/opt/boost-1.30.2/tools/build
When I run bjam from a clean build, here's what I get:
gcc-C++-action bin/time_math/gcc/debug/runtime-link-dynamic/time_math.o
gcc-Link-action bin/time_math/gcc/debug/runtime-link-dynamic/time_math
bin/time_math/gcc/debug/runtime-link-dynamic/time_math.o(.gnu.linkonce.t._ZN5boost9date_time15month_formatterINS_9gregorian10greg_monthENS0_13simple_formatEE12format_monthERKS3_RSo+0x3a): In function `boost::date_time::month_formatter