Subject: Re: [Boost-build] statically link project with Boost libs in Cygwin/msvc
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-06-12 04:13:18
On Friday 12 June 2009 Andrej van der Zee wrote:
> Thanks for your quick reply, as always.
> Below the Jamfile for my executable and the ouput of bjam -d2.
> On Linux it statically links as I expect. On Cygwin/Windows/msvc
> it holds it dependencies on the boost libs. But I am not sure what
> to expect, since I am not so proficient on Windows.
> Thank you,
> $ cat Jamfile
> project : requirements
> exe cap2net
> : [ glob *.cpp ]
> : <link>static
> : <define>BOOST_REGEX_RECURSIVE
> install $(INSTALL_PATH)/bin : cap2net ;
> $ bjam -d2
> ...found 1196 targets...
> ...updating 2 targets...
> file bin\msvc-9.0\debug\link-static\threading-multi\cap2net.exe.rsp
This is not static library. It is import library for DLL, therefore it's
natural that your library links to DLL. The static library would be named
I think the declarations in site-config have to be appropriately modified. E.g:
Note that using <name> conditionally as above requires that you use shared-lib as
opposed to lib, as otherwise auto-detection of 'this is actually searched lib'
might not work. 'searched-lib' is the recommended spelling anyway now.
Does this help?
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