undefined reference to boost::grégorien::greg_month::as_short_string() const

Cela a été demandé à plusieurs reprises mais je ne sais pas ce que je fais mal. Je vais essayer d'obtenir la date courante soustrait par 7. Voici les Principaux:

#include <iostream>
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/date_time/date_formatting.hpp>
#include <boost/date_time/gregorian/greg_month.hpp>


using namespace std;
using namespace boost::gregorian;

int main(int argc, char **argv) {

    time_t rawtime;
    struct tm *timeinfo;

    time (&rawtime);
    timeinfo = localtime (&rawtime);

    date cdate(timeinfo->tm_year+1900, timeinfo->tm_mon+1, timeinfo->tm_mday);
    cdate += date_duration(-7);

    string date = to_iso_string(cdate);
    cout << date << endl;
    return 0;
}

Lorsque j'essaie de compiler, je reçois l'erreur suivante.

E:/include/boost/date_time/date_formatting.hpp:44: undefined reference to `boost::gregorian::greg_month::as_short_string() const'
E:/include/boost/date_time/date_formatting.hpp:49: undefined reference to `boost::gregorian::greg_month::as_long_string() const'

Peut aider quelqu'un? J'ai pensé que j'ai inclus le nécessaire fichiers..

OriginalL'auteur FRules | 2013-07-04