Boost logo

Boost-Build :

Subject: Re: [Boost-build] Cygwin DLLs not named properly and installed in the right location
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-04-20 22:24:30


AMDG

Vladimir Prus wrote:
> On Monday 20 April 2009 19:28:05 Ronald Landheer-Cieslak wrote:
>
>> I'm trying to use Boost Build v2 on a software package that will run on
>> Cygwin, MinGW and other platforms. On Cygwin, DLLs are installed in the bin
>> directory and import libraries are installed in lib, and DLLs are prefixed
>> with "cyg" and have a ".dll" extention.Boost.Buildv2 currently sees Cygwin
>> as a UNIX platform, generates .so files and does not add the cyg prefix.
>> Also the .so files are installed in lib, not bin (which is good for UNIX
>> platforms).
>>
>
> Hi Ronald,
>
> can you explain the problem(s) with the current naming and placement
> as well as why the proposed changes are the right ones. I am not saying
> these are wrong, but Cygwin&Mingw is the constant source of confusion,
> so it would be nice to have some background to add as comments.
>
> I am sure that when I last tried, one could directly link to a shared
> library with .so extension, without any import library. A more recent
> comment in source has this about search paths:
>
> # windows (mingw,cygwin) -Bdynamic -lxxx
> # libxxx.dll.a
> # xxx.dll.a
> # libxxx.a
> # xxx.lib
> # cygxxx.dll (*)
> # libxxx.dll
> # xxx.dll
> # libxxx.a
>
> So, it looks like you change would make Boost.Build create shared
> libraries that cygwin linker would pick and directly link to,
> and therefore it's not clear why import library is needed -- can you
> clarify.
>

It works, but generates a warning:
Steven_at_D3RTHVC1 ~
$ cat test.cpp
#include <boost/thread/thread.hpp>

int f() { return 0; }

int main() {
    boost::thread t(&f);
}

Steven_at_D3RTHVC1 ~
$ g++ -o test -IC:/boost/trunk -LC:/boost/trunk/stage/lib
-lboost_thread_pthrea
d-gcc34-mt-1_39 test.cpp
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld:
warning: au
to-importing has been activated without --enable-auto-import specified
on the co
mmand line.
This should work unless it involves constant data structures referencing
symbols
 from auto-imported DLLs.Info: resolving vtable for
boost::detail::thread_data_b
aseby linking to __imp___ZTVN5boost6detail16thread_data_baseE (auto-import)

>> The attached patch fixes the absence of the cyg prefix and has the build
>> system generate import libraries, but does not place the DLLs in the bin
>> directory, which I can't seem to figure out how to do.
>>
>
> Why is that required? Can 'lib' directory be added to PATH?
>

It isn't required, AFAIK. It's just cygwin's convention
as is the cyg prefix.

In Christ,
Steven Watanabe


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