[CMake] FindBoost bug on debian or something's missing? - errata
Tomasz Kalkosiński
tomasz2k at poczta.onet.pl
Thu Dec 13 13:19:40 EST 2007
Sorry, I forgot to add make output:
> make
Scanning dependencies of target time
[100%] Building CXX object CMakeFiles/time.dir/time.o
Linking CXX executable time
CMakeFiles/time.dir/time.o: In function `boost::date_time::month_formatter<boost::gregorian::greg_month, boost::date_time::simple_format<char>, char>::format_month(boost::gregorian::greg_month const&, std::basic_ostream<char, std::char_traits<char> >&)':
time.cpp:(.text._ZN5boost9date_time15month_formatterINS_9gregorian10greg_monthENS0_13simple_formatIcEEcE12format_monthERKS3_RSo[boost::date_time::month_formatter<boost::gregorian::greg_month, boost::date_time::simple_format<char>, char>::format_month(boost::gregorian::greg_month const&, std::basic_ostream<char, std::char_traits<char> >&)]+0x2d): undefined reference to `boost::gregorian::greg_month::as_short_string() const'
time.cpp:(.text._ZN5boost9date_time15month_formatterINS_9gregorian10greg_monthENS0_13simple_formatIcEEcE12format_monthERKS3_RSo[boost::date_time::month_formatter<boost::gregorian::greg_month, boost::date_time::simple_format<char>, char>::format_month(boost::gregorian::greg_month const&, std::basic_ostream<char, std::char_traits<char> >&)]+0x4c): undefined reference to `boost::gregorian::greg_month::as_long_string() const'
collect2: ld returned 1 exit status
make[2]: *** [time] Error 1
make[1]: *** [CMakeFiles/time.dir/all] Error 2
make: *** [all] Error 2
Source for time.cpp:
$ cat time.cpp
#include "boost/date_time/posix_time/posix_time.hpp"
#include <iostream>
int
main()
{
using namespace boost::posix_time;
using namespace boost::gregorian;
ptime now = microsec_clock::local_time();
time_iterator titr(now, milliseconds(800));
for (int i = 0 ; i < 10 ; ++titr, ++i)
{
ptime later = now + milliseconds (800);
std::cout << to_simple_string(*titr) << std::endl;
std::cout << to_simple_string(now) << std::endl;
std::cout << to_simple_string(later) << std::endl;
do {
now = microsec_clock::local_time();
} while (now < later);
}
return 0;
}
Greetings,
Tomasz Kalkosiński
More information about the CMake
mailing list