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?

 

Thanks,

 

Chris

 

From: Nogradi, Chris
Sent: Wednesday, November 23, 2011 8:20 AM
To: 'boost-build@lists.boost.org'
Subject: EXE linking with DLLs

 

Hello,

 

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

 

Thanks,

 

Chris



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.