Boost logo

Boost-Build :

From: Nicola Musatti (Nicola.Musatti_at_[hidden])
Date: 2007-03-15 09:02:55

Nicola Musatti <Nicola.Musatti <at>> writes:

> Hallo,
> I'm trying to configure odbc32 as an external library in a Jamfile. This works
> fine for those compilers which have it in their default library path; for
> Borland I need to specify a location that is relative to where the compiler is
> installed. Currently I have it hard-coded as follows:
> lib odbc
> :
> : <name>odbc32
> <toolset>borland:<search>"C:/Program Files/Borland/CBuilder6/Lib/Psdk"
> ;
> However I'd like to refer to the path that's specified in my user-config.jam
> file. Is that possible?

After finding out I had already placed this very question on this list (!!) and
rereading the answer I received then I came out with the following:

rule borland-path ( properties * )
    local res ;
    if ( <toolset>borland in $(properties) )
        local path = [ common.get-absolute-tool-path [
                common.get-invocation-command borland : bcc32 ] ] ;
        path-constant borland_root : $(path:D) ;
        res = <search>$(borland_root)/lib/psdk ;
    return $(res) ;

lib odbc
    : <name>odbc32

However, due to my still limited grasping of the internal workings of
Boost.Build, I have the following doubt: is the above being resolved
dynamically, i.e. being applied once for each toolset I specify on the command
line or does it pick up a default statically?

I'm asking because I have to support different Borland compilers, each with its
own path.

Thank you,
Nicola Musatti

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at