Subject: Re: [Boost-build] Question: windows static library that uses a dll.
From: Juan Carlos Franzoy (jfranzoy_at_[hidden])
Date: 2012-09-12 08:59:40
>> The scenario is the following:
>> lib A, is build as a dll or static library.
>> lib B is build only as a static library. B uses A.
>> exe C uses B and A.
>> In unix, i had no problems. But in windows ...
>> In windows I have
>> - two versions of A
>> - A.dll (shared) A.lib(importlib)
>> - AS.lib (static)
>> - two versions of B, both static:
>> - B.lib uses A.lib, and consecuently A.dll. B.lib referes A
>> with __declspec(dllimport)
>> - BS.lib uses AS.lib. BS.lib doesn't use __declspec(dllimport)
>> - two versions of C
>> - C.exe uses B.lib and A.lib ( and A.dll )
>> - CS.exe uses BS.lib and AS.lib
>> How can I express this in Jamfiles?
> You should be able to write this out basically
> as is (warning untested):
> lib A : $(A-sources) :
> <link>shared <define>A_DYN_LINK : : # requirements
> <define>A_DYN_LINK ; # usage requirements
> lib AS : $(A-sources) : <link>static ;
> lib B : $(B-sources) A : <link>static ;
> lib BS : $(B-sources) AS : <link>static ;
> exe C : A B ;
> exe CS : AS BS ;
This solution would duplicate all the targets which depends on A or B.
Is there any way of including conditionally some sources (A or AS, B or BS
for instance) in a target? or any other way to reduce verbosity?
Is there any way of doing defining only one target for library A?
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