Boost logo

Boost Users :

From: Keno (keno_at_[hidden])
Date: 2003-01-08 23:53:53


Ok Jeff, I hope you can help with this one. Created a date object and did a
call to cout with to_simple_string(0) and got linker errors. Program and
error are below. I looked at the greg_month.hpp file and realised that the
methods complained about are declared but not implemented. Could this be the
source of the problem?

________ CODE & COMPILE ERRORS _____________

#include <boost/date_time/gregorian/gregorian.hpp>
#include <iostream>
#include <string>

void main()
{
  using namespace boost::gregorian;

  date new_years_day(2002,Jan,10);
  std::cout << to_simple_string(new_years_day) << std::endl;
}

--------------------Configuration: boost_date - Win32
Debug--------------------
Compiling...
test_date.cpp
d:\softdev\vstudio6\vc98\include\new(35) : warning C4290: C++ Exception
Specification ignored
f:\libs\boost_1_29_0\boost\date_time\gregorian_calendar.ipp(61) : warning
C4244: 'initializing' : conversion from 'unsigned long' to 'unsigned short',
possible loss of data
        d:\softdev\vstudio6\vc98\include\xmemory(70) : while compiling
class-template member function 'struct
boost::date_time::year_month_day_base<class
boost::gregorian::greg_year,class boost::gregorian::greg_month,class
boost::gregorian::greg_day
> __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>::from_day_number(unsigned long)'
f:\libs\boost_1_29_0\boost\date_time\gregorian_calendar.ipp(62) : warning
C4244: 'initializing' : conversion from 'unsigned long' to 'unsigned short',
possible loss of data
        d:\softdev\vstudio6\vc98\include\xmemory(70) : while compiling
class-template member function 'struct
boost::date_time::year_month_day_base<class
boost::gregorian::greg_year,class boost::gregorian::greg_month,class
boost::gregorian::greg_day
> __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>::from_day_number(unsigned long)'
f:\libs\boost_1_29_0\boost\date_time\gregorian_calendar.ipp(66) : warning
C4244: 'argument' : conversion from 'unsigned long' to 'unsigned short',
possible loss of data
        d:\softdev\vstudio6\vc98\include\xmemory(70) : while compiling
class-template member function 'struct
boost::date_time::year_month_day_base<class
boost::gregorian::greg_year,class boost::gregorian::greg_month,class
boost::gregorian::greg_day
> __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>::from_day_number(unsigned long)'
Linking...
test_date.obj : error LNK2001: 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)
test_date.obj : error LNK2001: 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)
Debug/boost_date.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

boost_date.exe - 3 error(s), 4 warning(s)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net