Boost logo

Boost :

From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2003-11-24 18:05:17


At Monday 2003-11-24 15:02, you wrote:
>[deleted]
>Victor -
>
>The libary has been update to correctly support windows dll builds. There
>was a time over the weekend where the bjam file had not been checked in to
>match the code updates which is likely the cause of your problems. The
>latest regression tests for VC are back to normal now. In addition, almost
>all of the files in the library have been updated in the past few days to
>reflect the new Boost license for 1.31. So I believe everything should be
>back working again....
>
>Jeff

ok, here's my smallest test case that doesn't work. I did an update
shortly after receiving your email.
it would be nice to get rid of the warnings also, but the problem is the
undefined symbols for the link

------------- TimeStamp.hpp -------------------------
#include "boost/date_time/posix_time/posix_time.hpp"
#include <string>

///
struct TimeStamp: boost::posix_time::ptime
{
     TimeStamp():boost::posix_time::ptime(boost::posix_time::second_clock::universal_time()){}
     operator std::string()const {return to_iso_string(*this);}

};
---------------- DateTimeTest.cpp -------------------------
#include <iostream>
#include <string>
#include "TimeStamp.hpp"

using namespace std;

int main()
{
     TimeStamp now;
     string nowprint = now;
     cout << nowprint << endl;
     cout << now << endl;
     return 0;
}

=================== output from build (debug) ==========================
------ Rebuild All started: Project: BoostDateTime, Configuration: Debug
Win32 ------

Deleting intermediate files and output files for project 'BoostDateTime',
configuration 'Debug|Win32'.
Compiling...
DateTimeTest.cpp
c:\Projects\boost\boost\date_time\posix_time\conversion.hpp(26) : warning
C4244: 'argument' : conversion from 'time_t' to 'long', possible loss of data
c:\Projects\boost\boost\date_time\time_system_counted.hpp(59) : warning
C4244: 'initializing' : conversion from
'boost::date_time::counted_time_rep<config>::int_type' to
'boost::date_time::gregorian_calendar_base<ymd_type_,date_int_type_>::date_int_type',
possible loss of data
         with
         [
             config=boost::posix_time::millisec_posix_time_system_config
         ]
         and
         [
             ymd_type_=boost::gregorian::greg_year_month_day,
             date_int_type_=boost::date_time::int_adapter<unsigned
long>::int_type
         ]
         c:\Projects\boost\boost\date_time\time_system_counted.hpp(53) :
while compiling class-template member function
'boost::date_time::counted_time_rep<config>::date_type
boost::date_time::counted_time_rep<config>::date(void) const'
         with
         [
             config=boost::posix_time::millisec_posix_time_system_config
         ]
         c:\Projects\boost\boost\date_time\time_system_counted.hpp(114) :
see reference to class template instantiation
'boost::date_time::counted_time_rep<config>' being compiled
         with
         [
             config=boost::posix_time::millisec_posix_time_system_config
         ]
         c:\Projects\boost\boost\date_time\time.hpp(52) : see reference to
class template instantiation
'boost::date_time::counted_time_system<time_rep>' being compiled
         with
         [
             time_rep=boost::posix_time::int64_time_rep
         ]
         c:\Projects\boost\boost\date_time\posix_time\ptime.hpp(32) : see
reference to class template instantiation
'boost::date_time::base_time<T,time_system>' being compiled
         with
         [
             T=boost::posix_time::ptime,
             time_system=boost::posix_time::posix_time_system
         ]
Linking...
DateTimeTest.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: __thiscall
boost::gregorian::greg_month::greg_month(unsigned short)"
(__imp_??0greg_month_at_gregorian@boost@@QAE_at_G@Z) referenced in function
"private: static class boost::posix_time::ptime __cdecl
boost::date_time::second_clock<class boost::gregorian::date,class
boost::posix_time::ptime>::create_time(struct tm *)"
(?create_time@?$second_clock_at_Vdate@gregorian_at_boost@@Vptime_at_posix_time_at_3@@date_time_at_boost@@CA?AVptime_at_posix_time_at_3@PAUtm@@@Z)
DateTimeTest.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: unsigned short __thiscall
boost::gregorian::greg_month::as_number(void)const "
(__imp_?as_number_at_greg_month_at_gregorian@boost@@QBEGXZ) 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)
DateTimeTest.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: char const * __thiscall
boost::gregorian::greg_month::as_long_string(void)const "
(__imp_?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)
DateTimeTest.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: char const * __thiscall
boost::gregorian::greg_month::as_short_string(void)const "
(__imp_?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)
DateTimeTest.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: __thiscall
boost::gregorian::greg_month::operator unsigned short(void)const "
(__imp_??Bgreg_month_at_gregorian@boost@@QBEGXZ) referenced in function
"public: static unsigned long __cdecl
boost::date_time::gregorian_calendar_base<struct
boost::date_time::year_month_day_base<class
boost::gregorian::greg_year,class boost::gregorian::greg_month,class
boost::gregorian::greg_day>,unsigned long>::day_number(struct
boost::date_time::year_month_day_base<class
boost::gregorian::greg_year,class boost::gregorian::greg_month,class
boost::gregorian::greg_day> const &)"
(?day_number@?$gregorian_calendar_base_at_U?$year_month_day_base_at_Vgreg_year_at_gregorian@boost@@Vgreg_month_at_23@Vgreg_day_at_23@@date_time_at_boost@@K_at_date_time_at_boost@@SAKABU?$year_month_day_base_at_Vgreg_year_at_gregorian@boost@@Vgreg_month_at_23@Vgreg_day_at_23@@23@@Z)
DateTimeTest.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: __thiscall
boost::gregorian::greg_month::greg_month(enum
boost::date_time::months_of_year)"
(__imp_??0greg_month_at_gregorian@boost@@QAE_at_W4months_of_year_at_date_time_at_2@@Z)
referenced in function "protected: virtual void __thiscall
boost::date_time::date_names_put<struct
boost::gregorian::greg_facet_config,char,class
std::ostreambuf_iterator<char,struct
std::char_traits<char> > >::do_put_month_short(class
std::ostreambuf_iterator<char,struct std::char_traits<char> > &,enum
boost::date_time::months_of_year)const "
(?do_put_month_short@?$date_names_put_at_Ugreg_facet_config_at_gregorian@boost@@DV?$ostreambuf_iterator_at_DU?$char_traits_at_D@std@@@std@@@date_time_at_boost@@MBEXAAV?$ostreambuf_iterator_at_DU?$char_traits_at_D@std@@@std@@W4months_of_year_at_23@@Z)
DateTimeTest.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: enum boost::date_time::months_of_year
__thiscall boost::gregorian::greg_month::as_enum(void)const "
(__imp_?as_enum_at_greg_month_at_gregorian@boost@@QBE?AW4months_of_year_at_date_time_at_3@XZ)
referenced in function "public: static void __cdecl
boost::date_time::ostream_month_formatter<class
boost::date_time::date_names_put<struct
boost::gregorian::greg_facet_config,char,class
std::ostreambuf_iterator<char,struct
std::char_traits<char> > >,char>::format_month(class
boost::gregorian::greg_month const &,class std::basic_ostream<char,struct
std::char_traits<char> > &,class boost::date_time::date_names_put<struct
boost::gregorian::greg_facet_config,char,class
std::ostreambuf_iterator<char,struct std::char_traits<char> > > const &)"
(?format_month@?$ostream_month_formatter_at_V?$date_names_put_at_Ugreg_facet_config_at_gregorian@boost@@DV?$ostreambuf_iterator_at_DU?$char_traits_at_D@std@@@std@@@date_time_at_boost@@D_at_date_time_at_boost@@SAXABVgreg_month_at_gregorian@3_at_AAV?$basic_ostream_at_DU?$char_traits_at_D@std@@@std@@ABV?$date_names_put_at_Ugreg_facet_config_at_gregorian@boost@@DV?$ostreambuf_iterator_at_DU?$char_traits_at_D@std@@@std@@@23@@Z)
Debug/BoostDateTime.exe : fatal error LNK1120: 7 unresolved externals

Build Time 0:07
Build log was saved at
"file://c:\Projects\Programming\SeriousTesting\BoostDateTime\Debug\BuildLog.htm"
BoostDateTime - 8 error(s), 2 warning(s)

---------------------- Done ----------------------

     Rebuild All: 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