Boost logo

Boost Users :

From: Renan Polo Montebelo (renan_polo_at_[hidden])
Date: 2005-10-19 15:03:56


-- Sorry if this message is duplicated --

I'm preety new to Boost :-)

When I try to compile / link this little program:

#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
 using namespace boost::gregorian;
 
#include <string>
    using namespace std;

int main() {
 
 try {
  string myString = "2005/10/13";
  date myDate( from_string( myString ) );
  cout << myDate << endl;
 } catch ( ... ) {
  cout << "Exception" << endl;
 }
}

I receive the following message from Borland 5.5.1:

Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >& std::basic_string<ch
ar, std::char_traits<char>, std::allocator<char> >::replace<const char *>(char *, char *, const char *, const char *)' r
eferenced from D:\RENAN\PROJETOS\PHONE\TESTE.OBJ

And this one from g++ 3.4.4:

/cygdrive/d/Config/Renan/CONFIG~1/Temp/ccgNFXMG.o:teste.cpp:(.text$_ZN5boost9dat
e_time19month_str_to_ushortINS_9gregorian10greg_monthEEEtSs[unsigned short boost
::date_time::month_str_to_ushort<boost::gregorian::greg_month>(std::basic_string
<char, std::char_traits<char>, std::allocator<char> >)]+0x102): undefined refere
nce to `boost::gregorian::greg_month::get_month_map_ptr()'
collect2: ld returned 1 exit status

I can't figure out what's happening, but I'm sure the problem is from_string(). When I don't use it, everything works fine.

Can someone help me?

Boost version: 1_33_0

Thanks in advance,
Renan Montebelo.

        

        
                
_______________________________________________________
Promogco Yahoo! Acesso Gratis: a cada hora navegada vocj acumula cupons e concorre a mais de 500 prjmios! Participe! http://yahoo.fbiz.com.br/



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