Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-11-08 15:13:29


Kevin Wheatley wrote:
> OK, so it looks better, the rsp file contains a line for each of the 3
> QT libraries, but also adds three extra lines similar to this:
>
> "last of my objects ..."
>
> <l/msvc-7.1/debugthreading-multi>qtmain
> <l/msvc-7.1/debugthreading-multi>QtCore
> <l/msvc-7.1/debugthreading-multi>QtGui

This is because of the $(LIBRARIES) variable defined as
    flags msvc.link LIBRARIES <library> ;
being included in the response file (this appears to be what the
previous code was adding, but with the <...> stuff resolved). The reason
this is occurring is because of code like this:

    lib user32 : : <name>user32 ;
    exe foo : bar.cpp : <library>user32 ;

> "qtmaind"
> "QtCored4"
> "QtGuid4"

These are pulled in by the $(FINDLIBS_SA) variable and can be reproduced
by the following code:

    lib user32 : : <name>user32 ;
    exe foo : bar.cpp user32 ;

The fix is to use $(FINDLIBS_SA:S=.lib) instead, forcing the .lib suffix
to be added. Thus, you have:
     @"@($(<[1]:W).rsp:E=$(nl)"$(>)"
         $(nl)"$(LIBRARIES)"
         $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)"
         $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)"
     )"

The only thing I can think of for the libraries is to have something
along the lines of:

    rule link ( ... )
    {
       local libraries = resolve-path-for-property <libraries> ;
       flag msvc.link LIBRARIES $(libraries) ;
    }

but written such that it actually works :).

> (as well as a couple of blank lines - very minor)

Most of those actually contain whitespace and are because I have the
@(...) broken over several lines.

- Reece


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