Boost logo

Boost-Build :

From: Guido Ziliotti (guido.ziliotti_at_[hidden])
Date: 2008-07-07 03:01:19


You may found some help searching for "My troubles when compiling
without link=static. (with msvc-8.0)" and its replies.

My favourite way to get the job done is outlined, anyway here it
follows. It's window specific but easy enough to be translated with
minimal effort.

1) I' m assuming you have already built the static or shared libs you
need. In case you have not then the line

bjam --build-type=complete install

will give you what you need (and some more possibly).

Then you just need a Jamroot file such as
# Jamroot contet follows #
path-constant BOOST_INSTALLED_LIB : C:/Boost/lib ;
path-constant BOOST_INSTALLED_INC : C:/Boost/include/boost-1_35 ;
path-constant BOOST_ROOT : C:/guido/env/boost/boost_1_35_0 ;
use-project /boost : $(BOOST_ROOT) ;
project
 : requirements <include>$(BOOST_INSTALLED_INC)
 <linkflags>/LIBPATH:$(BOOST_INSTALLED_LIB)
 ;

exe bob : main.cpp ;
# this should be enough

# part of my previous post you may like to look at
# exe first : first.cpp ;
# exe options_description : options_description.cpp ;
# exe multiple_sources : multiple_sources.cpp ;
# exe custom_syntax : custom_syntax.cpp ;
# exe real : real.cpp ;
# exe regex : regex.cpp /boost/regex//boost_regex ;

# Jamroot contet ends here#

As to vc90 and vc80 you probably need to add --toolset=msvc-8.0, or
--toolset=msvc-9.0 to your bjam command line.

My Best Regards

Guido.

On Thu, Jul 3, 2008 at 8:13 AM, <t3_at_[hidden]> wrote:
> Hi,
>
>
>
> I'm trying to learn to use boost-build/bjam on a very simple little project
> using the boost program_options library.
>
> I'm using a single JamRoot file for building on both Linux and Vista (both
> in 32 and 64 bit variants).
>
>
>
> And, despite google, I can't find a sensible way to specify the lib in my
> jamroot.
>
>
>
> For Linux, this works:
>
> exe bob : main.cpp boost_program_options ;
>
>
>
> lib boost_program_options : : <name>boost_program_options-mt-s ;
>
>
>
> But obviously that hard-codes the name of the lib, so it only works
> correctly for one variant and doesn't work on Windows.
>
> So I thought I could do something like:
>
> lib program_options : : <link>shared <threading>multi <variant>debug
> <toolset>msvc <name>boost_program_options-vc90-mt-gd-1_35
>
>
>
> But
>
> a) That just doesn't work.
>
> b) boost-build doesn't seem to give me any way to distinguish between vc90
> and vc80.
>
>
>
> So how am I supposed to specify the boost libraries?
>
> Surely it can't be this hard?
>
>
>
> Thanks.
>
>
>
> Jim
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost-build
>
>


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk