Boost logo

Boost Users :

Subject: Re: [Boost-users] [bjam] Building Regex with static runtime linking
From: Max (more4less_at_[hidden])
Date: 2009-06-09 20:53:06


Hello John,

> Subject: Re: [Boost-users] [bjam] Building Regex with static runtime
linking
>
> > 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

I have tried with this

bjam toolset=msvc-9.0 link=static runtime-link=static release debug
--with-regex stage

but I get

WARNING: No python installation configured and autoconfiguration
         failed. See http://www.boost.org/libs/python/doc/building.html
         for configuration instructions or pass --without-python to
         suppress this message and silently skip all Boost.Python targets
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

In fact, I have ever used this

bjam --toolset=msvc --builddir=./ address-model=32 link=static
runtime-link=shared threading=multi stage debug release
--with-program_options

and got the expected lib's (So do test, date_time, thread, signal,
serialization and filesystem). But with this

bjam --toolset=msvc --builddir=./ address-model=32 link=static
runtime-link=shared threading=multi stage debug release --with-regex
-sHAVE_ICU=1

(with or w/o -sHAVE_ICU=1 does not make difference)

I got the a.m. error message.

How is Regex different from program_options in this matter?

>
> which should give you 2 static lib variants linked against the 2 msvc
static
> runtimes.
>
> HTH, John.

Thank you very much, John. You are always warm-hearted and very helpful. :-)

B/Rgds
Max


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net