When compiling a Visual Studio 2005 project that references mixed C ++ managed / unmanaged code, I get the following error:
1> LINK: fatal error LNK1104: cannot open file 'libboost_date_time-vc80-mt-1_42.lib'
I followed the Getting Started Guide . The relevance of this fragment:
"Boost.DateTime has a binary component that is only needed if you use its to_string / from_string or serialization functions, or if you are targeting Visual C ++ 6.x or Borland."
I did a global search for "to_string" and "from_string". There are no occurrences in the code of these DateTime methods.
The documentation for the DateTime library itself has this snippet:
"The library has several functions that require the creation of a library file (mainly the functions to_string, from_string). Most users of the library can effectively use the library WITHOUT building the library, but just include the required ones. If the library is needed, the Jamfile in the build directory will create a" static "library (libboost_date_time ) and a "dynamic / shared" library (boost_date_time) that contains these functions. "
How do I solve this problem? A simple solution is to build a library or use the Windows binary installer from BoostPro, however it bothers me that a compiled library is required when, according to the documentation, Iām not in the situation that requires it.
Another question is that the DateTime documentation seems to indicate that its "mainly to_string, from_string" "can my code possibly reference some other function that would require creating a library file? Who Does anyone know what other functions are included? Are there functions that themselves wrap or call to_string or from_string?
The only thing I use:
#include <boost/date_time/gregorian/gregorian.hpp>
c ++ boost datetime visual-studio-2005
mindless.panda
source share