Subject: Re: [Boost-build] Library generation GCC on Windows vs Linux
From: Christian Auby (christian_at_[hidden])
Date: 2009-11-20 08:12:16
If I rename "libhello.lib" to "libhello.a" it does link as expected on
MinGW. So I think you are right in that this is a naming bug. I guess
GCC (at least Mingw) looks for both "hello.lib" and "libhello.a" with
-lhello. Problem is that boost.build names it somewhere inbetween.
Vladimir Prus wrote:
> On Friday 20 November 2009 15:37:47 Christian Auby wrote:
>> First I compile a simple lib, like this:
>> lib hello : hello.cpp ;
>> This creates "libhello.lib" on Mingw and "libhello.a" on Linux. However,
>> if I compile an exe-file that requires the resulting lib (not depending
>> on the actual target, I can't do this because the lib is compiled
>> somewhere else):
>> lib hello ;
>> exe app : hello ;
>> This works on Linux since -lhello automatically looks for "libhello.a".
>> However, on Windows this looks for "hello.lib" which doesn't exist.
>> Seems to me the library generation on MinGW shouldn't add "lib" in front
>> of the resulting library name, or have I missed something?
> This seems like a bug -- I suspect the right solution is to use libhello.a
> on mingw, but I'll need to check how the libraries are named in the
> standard distribution.
> - Volodya
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
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