Boost logo

Boost-Build :

Subject: Re: [Boost-build] EXE linking with DLLs
From: Nogradi, Chris (Chris.Nogradi_at_[hidden])
Date: 2011-11-23 16:29:57

Well I tried to use the install rule to break these dependencies out but that did not help. Can anyone think of another hack to get around this issue?

There is a comment in targets.jam in compute-usage-requirements that seems to acknowledge that this behavior should be fixed:

        # TODO - Actually there are more possible candidates like for instance
        # when listing static library X as a source for another static library.
        # Then static library X will be added as a <source> property to the
        # second library's usage requirements but those requirements should last
        # only up to the first executable or shared library that actually links
        # to it.

If there is not a good workaround for this, can someone suggest a fix?



From: Nogradi, Chris
Sent: Wednesday, November 23, 2011 8:20 AM
To: 'boost-build_at_[hidden]'
Subject: EXE linking with DLLs


I am trying to link an EXE against some DLLs (.libs) and when I do so, the exe rules is also trying to link against the static libs that the dlls depend on. Here is what I am doing:

lib A : file1.c : <link>static ;
lib B : file2.c A : <link>static ;
lib dll : file3.c B : <link>shared ;

exe test : main.c dll ;

when test links, it includes dll.lib (this is good) and A.lib (which is not what I expected??) but not B.lib (which is what I expected). What am I doing wrong? I tried to use <library> without success. What is the proper way of linking against a dll without inheriting its dependant libs?

I am using the msvc toolset and Boost.Build 2011.04-svn



This e-mail and any attachments may contain confidential material for the sole use of the intended recipient. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

Thank you for your cooperation.

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