Boost logo

Boost-Build :

Subject: Re: [Boost-build] Import Library from Def File - MSVC
From: Juraj Ivanèiæ (juraj.ivancic_at_[hidden])
Date: 2011-02-06 16:58:44

On 6.2.2011 20:04, Richard Opsal wrote:
>>>> Juraj Ivanèiæ<juraj.ivancic_at_[hidden]> 02/05/11 7:07 AM>>>
> On 5.2.2011 3:23, Richard B. Opsal, Ph.D. wrote:
>> I am using Microsoft Visual C++ 2008.
>> In my JAM file, I would like to add statement as follows:
>> lib myImportLib : Exports.Def ;
> After a quick glance at msvc.jam there is<def-file> feature
> which seems to be exactly what you need:
> lib myImportLib : :<def-file>Exports.def ;
> It is not exactly documented, but it is stated in the extender
> manual section that it exists.
> The syntax you mention makes sense but doesn't work as expected
> (desired).
> I believe the issue is that<def-file> modifier is used in "link"
> rules in MSVC.JAM.
> What I need to invoke is the "lib" program to generate the import
> library.

Very true, it seems that it is only used when producing a DLL or EXE.
If you want to avoid hacking on msvc.jam - you might also try to
pass options to the librarian directly using <archiveflags> feature.

E.g. (untested)

lib myImportLib : : <archiveflags>/DEF:Exports.def ;

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