$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [bjam] Building Regex with static runtime linking
From: John Maddock (john_at_[hidden])
Date: 2009-06-09 12:27:34
> I want my program to be statically linked to runtime libs, which is using
> Boost.Regex.
>
> I'm using the following command:
>
> bjam --toolset=msvc-9.0 --builddir=./ --address-model=32 --link=static
> --runtime-link=static --threading=multi stage --build-type=complete
> --with-regex
>
> But I get the following error message:
>
> error: link=shared together with runtime-link=static is not allowed
> error: such property combination is either impossible
> error: or too dangerious to be of any use
>
> IMO, the option specified by "--link=static " is overlooked by bjam.
> What's the problem?
>
> Thanks for any information.
There are two issues here: it should be link=static runtime-link=static i.e. 
without the leading "--", and also build-type=complete then conflicts with 
the request to build static lib's only.  The easiest option is to just 
specify "--build-type=complete" and leave out the other options, otherwise 
it would need to be something like:
bjam toolset=msvc-9.0 link=static runtime-link=static release 
ebug  --with-regex
which should give you 2 static lib variants linked against the 2 msvc static 
runtimes.
HTH, John.