On Fri, 30 Jan 2004 22:48:20 -0700, Michael Buksas wrote
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.
First off, what version of bjam and boost are you using? I'm going to assume version 1.30.2 of boost.
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. ... ... details omitted... ... So things are compiling, but not linking.
I must not have the configuration for Boost.build correct, but I've tried everything I can think of. Any help would be appreciated.
I think that bjam isn't that great at compiling outside of the boost directory tree in the 1.30.2 version (I'm sure someone will correct me if I'm offbase here :). Here's what I do on Linux. I go into libs/date_time/build and run bjam. You will see a bin/libboost_date_time.a/gcc/... directory appear. If you troll down the directory eventually you will find the libboost_date_time.a file. Then I copy this file into a well known location like BOOST_ROOT/bin and then simply include that into my makefile using -L and -l. I believe in the next release there is some sort of bjam --install option that will do all this for you, but I don't know the details. You might want to post on the Jamboost list about that: http://www.boost.org/more/mailing_lists.htm#jamboost HTH, Jeff