Boost logo

Boost-Build :

Subject: Re: [Boost-build] EXE linking with DLLs
From: Matthew Chambers (matt.chambers42_at_[hidden])
Date: 2011-11-23 17:21:35

On 11/23/2011 8:20 AM, Nogradi, Chris wrote:
> 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

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

exe test : main.c ; <library>dll/<link>shared


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