
I'm still getting undefined symbols attempting to use date_time library with Visual Studio.NET 2003 Since the program is so short to demonstrate the problem, I include it here: ================================================================== #include <iostream > #include <string> #include "boost/date_time/posix_time/posix_time.hpp" int main() { boost::posix_time::ptime now = boost::posix_time::second_clock::universal_time(); boost::posix_time::ptime cnow(boost::posix_time::second_clock::universal_time()); std::string xx = to_iso_string(now); std::cout << to_iso_string(boost::posix_time::second_clock::universal_time()) << std::endl; std::cout << now << std::endl; std::cout << xx << std::endl; std::cout << to_iso_string(cnow) << std::endl; return 0; } ================================================================== produces the following output: ------ Build started: Project: OneLineDateTime, Configuration: Debug Win32 ------ Linking... OneLineDateTime.obj : error LNK2019: unresolved external symbol "public: char const * __thiscall boost::gregorian::greg_month::as_long_string(void)const " (?as_long_string@greg_month@gregorian@boost@@QBEPBDXZ) referenced in function "public: static class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl boost::date_time::month_formatter<class boost::gregorian::greg_month,class boost::date_time::iso_format>::format_month(class boost::gregorian::greg_month const &,class std::basic_ostream<char,struct std::char_traits<char> > &)" (?format_month@?$month_formatter@Vgreg_month@gregorian@boost@@Viso_format@date_time@3@@date_time@boost@@SAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@ABVgreg_month@gregorian@3@AAV45@@Z) OneLineDateTime.obj : error LNK2019: unresolved external symbol "public: char const * __thiscall boost::gregorian::greg_month::as_short_string(void)const " (?as_short_string@greg_month@gregorian@boost@@QBEPBDXZ) referenced in function "public: static class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl boost::date_time::month_formatter<class boost::gregorian::greg_month,class boost::date_time::iso_format>::format_month(class boost::gregorian::greg_month const &,class std::basic_ostream<char,struct std::char_traits<char> > &)" (?format_month@?$month_formatter@Vgreg_month@gregorian@boost@@Viso_format@date_time@3@@date_time@boost@@SAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@ABVgreg_month@gregorian@3@AAV45@@Z) Debug/OneLineDateTime.exe : fatal error LNK1120: 2 unresolved externals Build log was saved at "file://c:\Projects\Programming\SeriousTesting\OneLineDateTime\Debug\BuildLog.htm" OneLineDateTime - 3 error(s), 0 warning(s) ---------------------- Done ---------------------- Build: 0 succeeded, 1 failed, 0 skipped Victor A. Wagner Jr. http://rudbek.com The five most dangerous words in the English language: "There oughta be a law"