Boost logo

Boost :

From: Ulrich Eckhardt (doomster_at_[hidden])
Date: 2008-07-12 01:50:11


On Friday 11 July 2008 23:02:51 Edward Diener wrote:
> I was recently using the date/time library for the first time, used
> functionality which I was pretty sure was not in the built library based
> on the documentation, yet autolinking code was brought in to force me as
> an end-user to specify the location of the import library. When I
> defined BOOST_DATE_TIME_NO_LIB in my project settings, everything linked
> fine without specifying the import library, so obviously the DLL was not
> needed. Nobody wants to distribute a shared library with their code when
> it is unnecessary.

If the distribution of unnecessary DLLs is all you are concerned about, then I
think your problems are solved. I haven't looked at this particular case, but
I know that in a similar case, one of my headers uses WSAGetLastError(),
which requires me to link in WinSock libraries only to tell me later that the
according lib was discarded because it is unused.

So, just link as usual and then check if the resulting binary actually needs
the DLL, otherwise I think it is a minor inconvenience one can live with or
get around it as you documented.

cheers

Uli


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk