|
Boost-Build : |
From: t3_at_[hidden]
Date: 2008-07-10 15:42:30
Jurko,
You are right, this does work:
project boost
: requirements
<include>"C:\\Program Files\\Boost\\include\\boost-1_35"
<link>shared:<define>BOOST_ALL_DYN_LINK
;
lib program_options : : <link>static
<threading>multi
<variant>debug
<toolset>msvc
<name>libboost_program_options-vc90-mt-gd-1_35
<search>"C:\\Program Files\\Boost\\lib"
;
lib program_options : : <link>static
<threading>multi
<variant>debug
<toolset>msvc
<name>libboost_program_options-vc90-mt-gd-1_35
<address-model>32
<search>"C:\\Program Files\\Boost\\lib"
;
etc...
I think the problem I had before was caused by the default behaviour of the
auto-linking configuration - which is for a shared link and thus my previous
version (which specified <link>shared) tried to bring in both static and
dynamic libraries.
The "<link>shared:<define>BOOST_ALL_DYN_LINK" fixes that.
>From rooting around in the msvc.jam I see that I can't get
"<toolset>msvc-9.0" (VS2008) because I'm using the m12 release of
boost-build, which doesn't go past 8.0.
I can see from this mailing list that a whole load of fixes have gone into
boost-build on the trunk since m12, are there any plans for a new release?
Following Guido's hints my site-config is currently:
# Begin site-config.jam
project boost
: requirements
<include>"C:\\Program Files
(x86)\\Boost\\include\\boost-1_35"
<address-model>64:<library-path>"C:\\Program
Files\\Boost\\lib"
<address-model>32:<library-path>"C:\\Program Files
(x86)\\Boost\\lib"
: default-build
<address-model>64
;
alias program_options ;
# End site-config.jam
Which seems to work perfectly whether or not I specify the address-model on
the command line and means that I can have different address-models on
different machines.
I think this is working because my exe is dependent on boost and thus gets
the address-model default, but would presumably leave me open to conflicting
defaults in different projects (which I'd consider a bug in my config
files).
I'm going to try to write up a constructive email about why it's been so
difficult for me to get this far with boost-build.
Thanks for all your help.
Jim
-----Original Message-----
From: boost-build-bounces_at_[hidden]
[mailto:boost-build-bounces_at_[hidden]] On Behalf Of Jurko Gospodnetic
Sent: 10 July 2008 02:18
To: boost-build_at_[hidden]
Subject: Re: [Boost-build] How to link in boost libraries using boost-build?
Hi.
> 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.
For our libraries we do something like this (example for one of the
OpenSSL libraries):
lib eaylib_static_rtlStatic : : <file>$(SSL_ROOT)/libcrypto.a
<toolset>gcc ;
lib eaylib_static_rtlStatic : :
<name>$(SSL_ROOT)/lib/VC/static/libeay32MTd <toolset>msvc <variant>debug
;
lib eaylib_static_rtlStatic : :
<name>$(SSL_ROOT)/lib/VC/static/libeay32MT <toolset>msvc
<variant>release ;
explicit eaylib_static_rtlStatic ;
And it works fine so I do not see what you mean by 'a) That just
doesn't work'.
You should be able to distinguish between different alternatives
based on the toolset feature (e.g. <toolset>msvc-9.0) or the
toolset:version subfeature (e.g. <toolset:version>9.0). Not sure if the
toolset:version feature is spelled exactly like that, but that should be
easy to check.
I know that Boost Build has a bug though when you add properties
conditioned on multiple other properties one of which is a versioned
toolset. It then ignores all conditions other than that versioned
toolset. But there is already a failing test case for this in the trunk.
Hope this helps.
Best regards.
_______________________________________________
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