Boost logo

Boost-Build :

From: Jim Talbut (jtalbut_at_[hidden])
Date: 2008-07-08 13:11:28


Actually this IS very nearly it:

project boost

                : requirements

                                <include>"C:\\Program Files
(x86)\\Boost\\include\\boost-1_35"

                                <address-model>32:<library-path>"C:\\Program
Files (x86)\\Boost\\lib"

                                <address-model>64:<library-path>"C:\\Program
Files\\Boost\\lib"

                                ;

 

alias program_options ;

 

It does work as long as I specify the address-model on the command line.

 

I tried adding

                                <address-model>:<library-path>"C:\\Program
Files (x86)\\Boost\\lib"

to act as a default, but that doesn't get added to the linker line.

 

Jim

 

From: Jim Talbut [mailto:jtalbut_at_[hidden]] On Behalf Of
t3_at_[hidden]
Sent: 08 July 2008 17:58
To: 'Boost.Build developer's and user's list'
Subject: RE: [Boost-build] How to link in boost libraries using boost-build?

 

Unfortunately that's not it.

 

Does no-one actually have a working site-config that does this?

I guess everyone using boost-build has the boot source sitting around and
links directly to the jamfiles in that, but I can't do that.

 

I have this in site-config.jam:

project boost

                : usage-requirements

                                <include>"C:\\Program Files
(x86)\\Boost\\include\\boost-1_35"

                                <address-model>32:<library-path>"C:\\Program
Files (x86)\\Boost\\lib"

                                <address-model>64:<library-path>"C:\\Program
Files\\Boost\\lib"

                                ;

 

                                

alias program_options

    : # no sources

    : # no build requirements

    : # no default build

    : # no additional usage requirements

    ;

 

 

And when I build it I get:

c:\Users\jtalbut\Projects\leonidas>bjam --debug-building

building project Jamfile</c:/Users/jtalbut/Projects/leonidas>
('object(project-target)@33') with

 

     Building target './leonidas'

         Build request:

         Command line free features:

         Target requirements:
<toolset>msvc,<runtime-link>shared:<threading>multi

 

         Common properties: <asynch-exceptions>off <debug-store>object
<debug-symbols>on <exception-handling>on <extern-c-nothrow>off <hardc

ode-dll-paths>true <host-os>windows <inlining>off <install-dependencies>off
<link>shared <midl-robust>yes <midl-stubless-proxy>yes <optimiza

tion>off <os>NT <pch>on <profiling>off <rtti>on <runtime-debugging>on
<runtime-link>shared <stdlib>native <suppress-import-lib>false <symlin

k-location>project-relative <target-os>windows <threading>multi
<toolset>msvc <user-interface>console <variant>debug <warnings-as-errors>off

 <warnings>on

 

         Building target '/program_options'

             Build request: <asynch-exceptions>off <debug-store>object
<debug-symbols>on <exception-handling>on <extern-c-nothrow>off <inli

ning>off <link>shared <midl-robust>yes <midl-stubless-proxy>yes
<optimization>off <os>NT <pch>on <profiling>off <rtti>on <runtime-debugging>

on <runtime-link>shared <stdlib>native <target-os>windows <threading>multi
<toolset>msvc <variant>debug <warnings-as-errors>off <warnings>on

 

             Command line free features:

             Target requirements:

 

             Common properties: <asynch-exceptions>off <debug-store>object
<debug-symbols>on <exception-handling>on <extern-c-nothrow>off <h

ardcode-dll-paths>true <host-os>windows <inlining>off
<install-dependencies>off <link>shared <midl-robust>yes
<midl-stubless-proxy>yes <opti

mization>off <os>NT <pch>on <profiling>off <rtti>on <runtime-debugging>on
<runtime-link>shared <stdlib>native <suppress-import-lib>false <sy

mlink-location>project-relative <target-os>windows <threading>multi
<toolset>msvc <user-interface>console <variant>debug <warnings-as-errors

>off <warnings>on

 

             Usage requirements for program_options are

             Build properties: <asynch-exceptions>off <debug-store>object
<debug-symbols>on <exception-handling>on <extern-c-nothrow>off <h

ardcode-dll-paths>true <host-os>windows <inlining>off
<install-dependencies>off <link>shared <midl-robust>yes
<midl-stubless-proxy>yes <opti

mization>off <os>NT <pch>on <profiling>off <rtti>on <runtime-debugging>on
<runtime-link>shared <stdlib>native <suppress-import-lib>false <sy

mlink-location>project-relative <target-os>windows <threading>multi
<toolset>msvc <user-interface>console <variant>debug <warnings-as-errors

>off <warnings>on

             Usage requirements from program_options are
<include>/C:/Program Files (x86)/Boost/include/boost-1_35

 

         Usage requirements for leonidas are <include>/C:/Program Files
(x86)/Boost/include/boost-1_35

         Build properties: <asynch-exceptions>off <debug-store>object
<debug-symbols>on <exception-handling>on <extern-c-nothrow>off <hardc

ode-dll-paths>true <host-os>windows <include>/C:/Program Files
(x86)/Boost/include/boost-1_35 <inlining>off <install-dependencies>off
<link>

shared <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT
<pch>on <profiling>off <rtti>on <runtime-debugging>on <runtime-lin

k>shared <stdlib>native <suppress-import-lib>false
<symlink-location>project-relative <target-os>windows <threading>multi
<toolset>msvc <use

r-interface>console <variant>debug <warnings-as-errors>off <warnings>on

         Usage requirements from leonidas are <include>/C:/Program Files
(x86)/Boost/include/boost-1_35

...patience...

...found 340 targets...

...updating 1 target...

msvc.link bin\msvc\debug\threading-multi\leonidas.exe

LINK : fatal error LNK1104: cannot open file
'libboost_program_options-vc90-mt-gd-1_35.lib'

 

        call "c:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 >nul

link /NOLOGO /INCREMENTAL:NO /DEBUG /subsystem:console
/out:"bin\msvc\debug\threading-multi\leonidas.exe"
@"bin\msvc\debug\threading-multi

\leonidas.exe.rsp"

        if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%

        if exist "bin\msvc\debug\threading-multi\leonidas.exe.manifest" (

            mt -nologo -manifest
"bin\msvc\debug\threading-multi\leonidas.exe.manifest"
"-outputresource:bin\msvc\debug\threading-multi\leon

idas.exe;1"

        )

 

...failed msvc.link bin\msvc\debug\threading-multi\leonidas.exe...

...failed updating 1 target...

 

c:\Users\jtalbut\Projects\leonidas>

 

 

I get almost exactly the same if I change the site-config to:

project boost

                : requirements

                                <address-model>32:<library-path>"C:\\Program
Files (x86)\\Boost\\lib"

                                <address-model>64:<library-path>"C:\\Program
Files\\Boost\\lib"

                : usage-requirements

                                <include>"C:\\Program Files
(x86)\\Boost\\include\\boost-1_35"

                                ;

 

                                

alias program_options

    : # no sources

    : # no build requirements

    : # no default build

    : # no additional usage requirements

    ;

 

 

As Guido says, it's clear, a bit tricky and real - and I'd love to find that
bjam can solve it, but so far it doesn't.

 

Jim

 

 

From: boost-build-bounces_at_[hidden]
[mailto:boost-build-bounces_at_[hidden]] On Behalf Of Guido Ziliotti
Sent: 08 July 2008 09:07
To: Boost.Build developer's and user's list
Subject: Re: [Boost-build] How to link in boost libraries using boost-build?

 

Well that's it. Isn't it?

IMHO this example or something like should be considered for mentioning in
some documentation. It's clear, a bit tricky and real.
And bjam solves it. With some Jurko help of course.

By the way is there a place where to have a complete list of <features>. I
am well aware I am missing a lot of them.

On Tue, Jul 8, 2008 at 8:02 AM, Jurko Gospodnetiæ
<jurko.gospodnetic_at_[hidden]> wrote:

 Hi.

 

I tried this:
project boost : requirements
               <address-model>
       : usage-requirements <include>"C:\\Program Files
(x86)\\Boost\\include\\boost-1_35" <library-path>"C:\\Program
Files (x86)\\Boost\\lib"
               ;
project boost : requirements
               <address-model>32
       : usage-requirements <include>"C:\\Program Files
(x86)\\Boost\\include\\boost-1_35" <library-path>"C:\\Program
Files (x86)\\Boost\\lib"
               ;
project boost : requirements
               <address-model>64
       : usage-requirements <include>"C:\\Program
Files\\Boost\\include\\boost-1_35" <library-path>"C:\\Program
Files\\Boost\\lib"
               ;
               
alias program_options : # no sources
   : # no build requirements
   : # no default build
   : # no additional usage requirements
   ;

 

 Hmmm... how about something like:

> project boost
> : usage-requirements
> <include>"C:\\Program Files
> (x86)\\Boost\\include\\boost-1_35"

> <address-model>32:<library-path>"C:\\Program Files
(x86)\\Boost\\lib"
> <address-model>64:<library-path>"C:\\Program
Files\\Boost\\lib"
> ;

 Or you might actually mean requirements instead of usage-requirements here.

 Note that I have not read the whole thread so I might be off the mark here,
in which case - just ignore my blabbering... :-)

 Best regards,
   Jurko Gospodnetiæ

_______________________________________________
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