Boost.Date Time is sapping my will to live (C++)

Started by
2 comments, last by MaulingMonkey 14 years, 9 months ago
No, really. I'm trying to compile a project which uses boost.Date Time from version 1.38, under Microsoft Visual Studio 2005, on Windows Vista 64 bit. I have added the relevant boost directories to both include files and libraries, and have pointed my compiler to boost_thread-vc80-mt-1_38.lib. Then, I #include 'boost/date_time/posix_time/posix_time.hpp', hit compile and am greeted with a string of errors, the first few of which are: posix_time_types.hpp(40) : error C2039: 'microsec_clock' : is not a member of 'boost::date_time' posix_time_types.hpp(40) : error C2143: syntax error : missing ';' before '<' posix_time_types.hpp(40) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C2039: 'time_t' : is not a member of 'std' I can give you the rest if you need them, but they all seam to revolve around this 'microsec_clock' type. Any suggestions? Also, note that i am using 'boost_thread-vc80-mt-1_38.lib', despite not knowing what the 'mt' means. I have several other versions of the library, as well as 'libboost_date_time...' type variations on this theme. Can anyone tell me what the difference is between these files? I can't seem to find much of use to me in the documentation. Thanks, Liam M.
Advertisement
mt probably means multi threaded. However, none of the above are library problems -- library problems would happen at link time, not compile time.

You can configure MSVC to dump out what header files it is including, and the chain. I forgot what exact verbose setting it is. Use it, and make sure that the header files you are including are the header files you want to be including.

Do you have more than one copy of boost installed? How, exactly, did you install it?

Is that hpp file a public interface of boost date time, or an internal header file?
Thanks for the reply NotAYakk,

I got fed up and tried doing a clean install with the Boost Pro installer, which I've always used for the sole purpose it's easier, and for no apparent reason it seems to have fixed the problem. And just for completeness, the header file (according to the documentation) appears to be a public interface.

And as for the 'mt' and 's' , I managed to guess they were single and multithreaded; however, I have others less obvious (at least to me), such as 'sgd'. Single debug perhaps?

Liam M.
Quote:Original post by Liam M
And as for the 'mt' and 's' , I managed to guess they were single and multithreaded; however, I have others less obvious (at least to me), such as 'sgd'. Single debug perhaps?


There's a decoder ring on the boost website.

This topic is closed to new replies.

Advertisement