Possibly you are including a "wrong" header that is triggering the compiler to link with the lib, even though you don't need it. Search for a #pragma comment(lib, ...) in the boost headers to find out if that is the case.
views:
251answers:
3
A:
MadKeithV
2010-03-02 16:46:18
I've searched the boost date_time headers and the only occurence of pragma was to disable a compiler warning on MSVC builds for their "deprecation" of localtime/gmtime functions.
user144182
2010-03-02 17:58:12
A:
boost comes with a tool called bcp that can be used to extract exactly the subset you need. take a look, sounds like you will find it helpful.
Omry
2010-03-02 17:41:48
bcp doesn't seem to be of much help - running it in report mode against my key headers give 1500+ dependencies in the boost source tree
user144182
2010-03-02 18:38:23
A:
Project compiles and links cleanly after the following troubleshooting:
I defined BOOST_LIB_DIAGNOSTIC - to see what diagnostic output I could get from the auto linker. Not too informative:
1>Linking to lib file: libboost_date_time-vc80-mt-1_42.lib
1>LINK : fatal error LNK1104: cannot open file 'libboost_date_time-vc80-mt-1_42.lib'
I then defined BOOST_ALL_NO_LIB=1 - disables all auto linking. Project now compiles and links cleanly.
Boost headers use pragma to signal compilers when to look for a lib file. While the date_time library does not do this, other headers within boost it depends on do.
user144182
2010-03-03 15:27:43