Opened 14 years ago

Closed 14 years ago

#2507 closed Bugs (worksforme)

windows builds auto link nonexistant date_time lib

Reported by: Patrick White <patbob@…> Owned by: az_sw_dude
Milestone: Boost 1.38.0 Component: date_time
Version: Boost 1.36.0 Severity: Problem
Keywords: Cc:

Description

Boost 1.37.0.

Windows builds appear to be attempting to autolink to static lib libboost_date_time*.lib, which is not compiled. Don't know whether the problem is that this lib isn't being compiled, or there's a stray autolink to a library that no longer exists. There doesn't appear to be any .cpp files in the date_time source hierarchy to be compiled into a lib, so, running with that...

workaround:

I modifed boost/config/user.hpp to define BOOST_ALL_NO_LIB, then rebuilt the libraries and the apps. This is way overkill as it removes autolinks for all libs, not just date_time, but heck, I don't like autolink anyway :). Program now compiles and doesn't try to link with nonexistant lib, so it successfully links and executes.

This reference most likely came about when I did the 1.33.1 -> 1.37.0 port and had to use posix_time where xtime had been used before. Nothing wrong with this, just providing the datapoint in case it's important.

Change History (3)

comment:1 by Marshall Clow, 14 years ago

Component: Nonedate_time
Owner: set to az_sw_dude

comment:2 by Andrey Semashev, 14 years ago

The library does have source files that need to be compiled into the library (see libs/date_time/src). There are parts of the library that don't depend on the separately compiled source, so I assume you got lucky and did not need the built library. However, if Boost.DateTime is properly built, I see no harm in having auto-link on all the time, since the linker will eventually not use the lib and thus not introduce the dependency.

comment:3 by Andrey Semashev, 14 years ago

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.