Boost logo

Boost-Build :

Subject: Re: [Boost-build] Library generation GCC on Windows vs Linux
From: Christian Auby (christian_at_[hidden])
Date: 2009-11-20 09:55:49


How is this collision? Not too familiar with msvc dll export libs.

If I understand correctly the lib you need to link to use "hello.dll" is
called "hello.lib". The dll libs aren't put in the same directory so is
that really an issue?

g++ (GCC) 3.4.5 (mingw-vista special r3)
ln (GNU coreutils) 5.97
MinGW-5.1.4

Even if MinGW at some point looked for "libhello.lib" you'd still have
the issue of MSVC not finding "hello.lib". Surely must be a way to make
them both happy so you don't have to rename libs every time you build or
keep compiler specific settings for all static libs in the Jamfile?

Christian

Rene Rivera wrote:
> Christian Auby wrote:
>> Just noticed that with toolset=msvc the library is called
>> "libhello.lib". Most libs that comes with the MSVC compiler do not have
>> the "lib"-prefix, so I guess boost.build should have called this
>> "hello.lib"?
>>
>> Supported by this error:
>>
>> "LINK : fatal error LNK1181: cannot open input file 'hello.lib'"
>>
>> depending on "hello"-lib does not look for "libhello.lib" but
>> "hello.lib".
>>
>> Renaming it to "hello.lib" makes it link.
>>
>> I did a manual fix of this, and with the two fixes combined the
>> exe-jamfile works with both mingw and msvc without changes.
>>
>> Fix:
>>
>> type.set-generated-target-prefix STATIC_LIB : <toolset>msvc : "" ;
>
> Unfortunately that creates a collision with MSVC DLL export LIBs. And
> hence why "lib" is prefixed to the static libraries. And to be
> consistent so was mingw. But at some point the Min GCC would search for
> "libxyz.lib", among a large list of other combinations, when specifying
> -lxyz. Which version of MinGW are you using?
>
>


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