|
Boost Users : |
Subject: Re: [Boost-users] Boost.date_time compilation error Debian GCC 4.3 Boost 1.35
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-03-10 12:27:59
AMDG
Joost Kraaijeveld wrote:
> #include <iostream>
> #include <boost/date_time/gregorian/gregorian.hpp>
> #include <boost/date_time/gregorian/formatters.hpp>
>
> int main(int argc, char** argv){
>
> boost::gregorian::date date = boost::gregorian::day_clock::local_day();
> std::cout << boost::gregorian::to_sql_string_type(date) << std::endl;
>
> return 0;
> }
>
> The error is:
>
> g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Main.d" -MT"Main.d" -o"Main.o" "../Main.cpp"
> ../Main.cpp: In function âint main(int, char**)â:
> ../Main.cpp:18: error: no matching function for call to âto_sql_string_type(boost::gregorian::date&)â
>
> I cannot find any solution anywhere hence my question: what am I doing wrong, and more important, how can I get it working?
>
You need either to_sql_string_type<char>(date) or just to_sql_string(date)
In Christ,
Steven Watanabe
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