Boost logo

Boost-Build :

Subject: Re: [Boost-build] Newbie question: how to change import library name (windows)
From: Jurko Gospodnetić (jurko.gospodnetic_at_[hidden])
Date: 2012-09-10 18:49:39


> I used <tag>@myrule to customize the library name, which was succesful,
> except for the import library. The import library name remains the same
> as the target name.
> Does anybody know how to make change /IMPLIB linker flag for
> mscv?

   I just played around with this for a sec and something like this
seems to work as expected:

> rule myrule ( name : type : properties )
> {
> switch $(type)
> {
> case SHARED_LIB : return yyy.dll ;
> case IMPORT_LIB : return yyy.lib ;
> }
> }
> lib xxx : a.cpp : <tag>@myrule ;

   Tested using the msvc toolset and it creates a DLL named yyy.dll and
its corresponding library names yyy.lib.

   Note that here the myrule rule gets called three times - once for the
intermediate OBJ target, once for the SHARED_LIB target (i.e. the DLL),
and once for the IMPORT_LIB target.

   Hope this helps.

   Best regards,
     Jurko Gospodnetić

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