getting started tutorial: link your program to a boost library

Hi, I've just installed boost and have been going through the getting started guide (for unix variants). I am having problems with the section that discusses how to link your program to a boost library, using boost.regex as an example. $ c++ -I path/to/boost_1_44_0 example.cpp -o example \ ~/boost/stage/lib/libboost_regex-gcc34-mt-d-1_36.a That file does not exist. In fact there is no boost directory in my home directory. I'm not sure if running ./bjam install worked. It did build for a while, but the last few lines of output were: ...failed updating 60 targets... ...skipped 12 targets... ...updated 8866 targets... there seem to be a bunch of object files in /usr/local/boost_1_44_0/bin.v2/libs/regex/build/gcc-4.4.5/release/threading-multi unfortunately, when I try and use those files I end up getting: collect2: ld returned 1 exit status Any help's appreciated, Oliver

Hi Oliver, If I'm thinking correctly, boost can be installed in /usr/include/boost for all users on a *nix box or, for individual preferences, can be installed in a sub-directory of the home directory (e.g filename beginning with ~ ). HTH, Ian -- -- ACCU - Professionalism in programming - http://www.accu.org/

Hi Oliver,
On Sun, Oct 24, 2010 at 3:00 AM, Oliver Adams
Hi,
I've just installed boost
How did you install it?
and have been going through the getting started guide (for unix variants). I am having problems with the section that discusses how to link your program to a boost library, using boost.regex as an example.
$ c++ -I path/to/boost_1_44_0 example.cpp -o example \ ~/boost/stage/lib/libboost_regex-gcc34-mt-d-1_36.a
That file does not exist. In fact there is no boost directory in my home directory.
That's not surprising; the command-line is meant as an example. The files you want should be below your build directory, if you're following the Getting Started Guide. See http://www.boost.org/doc/libs/1_44_0/more/getting_started/unix-variants.html...
I'm not sure if running ./bjam install worked. It did build for a while, but the last few lines of output were:
...failed updating 60 targets... ...skipped 12 targets... ...updated 8866 targets...
there seem to be a bunch of object files in /usr/local/boost_1_44_0/bin.v2/libs/regex/build/gcc-4.4.5/release/threading-multi
unfortunately, when I try and use those files I end up getting:
collect2: ld returned 1 exit status
That's a pretty uninformative error message. Is that all you get? -- Dave Abrahams BoostPro Computing http://www.boostpro.com
participants (3)
-
Dave Abrahams
-
Ian Bruntlett
-
Oliver Adams