Boost logo

Boost :

Subject: Re: [boost] Default variants on windows
From: Christian Holmquist (c.holmquist_at_[hidden])
Date: 2009-04-08 17:56:17

2009/4/8 Edward Diener <eldiener_at_[hidden]>

> Vladimir Prus wrote:
>> Per:
>> we have a problem that the default set of libraries
>> build on Windows does not match autolink defaults, which
>> causes confusion. In that issue, John say that the only
>> sensible solution for Windows is to build all possible
>> variants by default (IIRC, a total of 6). I would like
>> other Windows developers to comment if that is sensible
>> solution. In particular, is it best to build all possible
>> variants that user might need, or build just the variants
>> that autolink needs by default, so that user can build other
>> later.

>From getting started page, I read:
"The option “*--build-type=complete*” causes bjam to build all supported
variants of the libraries. For instructions on how to build only specific
variants, please ask on the Boost.Build mailing

Now, searching the mail-list is quite time-consuming (in my experience), so
I think it would be better to give a bunch of examples up-front to the user,
so that he/she doesn't need to bother about learning the syntax of bjam or
hunt down how to specify the basic options.

"The option “*--build-type=complete*” causes bjam to build all supported
variants of -ALL- the libraries.
If you intend to use only one or a few libraries, you can improve
compilation time by specifying them on the command line:

> bjam --with-thread --with-filesystem link=static threading=multi stage

Note the additional options 'link=static' and 'threading=multi'. This
instructs the build process to create only static libraries with thread
support enabled, which is a reasonable default for most windows executables.
There is however one more option of importance; which version of the runtime
library you want the boost libraries to use.

bjam --with-thread --with-filesystem link=static threading=multi
runtime-link=shared stage

Here we added the option 'runtime-link=shared', which is the bjam equivalent
of the IDE's Runtime Library property (located in Code Generation/Runtime
library). If your IDE project has this property set to 'Multi-threaded DLL'
or Multi-threaded Debug DLL, the above command line should give you
compatible libraries.

Finally, you may want to build the boost libraries of your choice for 64bit

bjam --with-thread --with-filesystem link=static threading=multi
runtime-link=shared address-model=64 stage


Maybe I got some of the details wrong, but I think something along these
lines would give users a better chance to get the build right. I've not used
boost libraries in dll's so I've no clue on how to specify that, but I guess
it should be added.
Also, I only have (limited) experience in boost build shipped with boost
1.35, so the command lines above are maybe no longer correct.

My 2...


Boost list run by bdawes at, gregod at, cpdaniel at, john at