|
Boost : |
From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2004-02-02 11:18:01
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_at_greg_month_at_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_at_Vgreg_month_at_gregorian@boost@@Viso_format_at_date_time_at_3@@date_time_at_boost@@SAAAV?$basic_ostream_at_DU?$char_traits_at_D@std@@@std@@ABVgreg_month_at_gregorian@3_at_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_at_greg_month_at_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_at_Vgreg_month_at_gregorian@boost@@Viso_format_at_date_time_at_3@@date_time_at_boost@@SAAAV?$basic_ostream_at_DU?$char_traits_at_D@std@@@std@@ABVgreg_month_at_gregorian@3_at_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"
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk