Boost logo

Boost-Build :

Subject: Re: [Boost-build] Import Library from Def File - MSVC
From: Vladimir Prus (ghost_at_[hidden])
Date: 2011-02-07 11:06:55


On Monday, February 07, 2011 00:58:44 Juraj Ivanèiæ wrote:
> 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 ;

I'd suggest trying:

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

to make things more explicit. I've no idea whether it will work, either -- please
try and report back.

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build: http://boost.org/boost-build2

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