Boost logo

Boost Users :

Subject: Re: [Boost-users] linker error when using from_simple_string()
From: Igor R (boost.lists_at_[hidden])
Date: 2013-03-17 15:02:09


>> > This line of code:
>> > date birthday(from_simple_string(s));
>> >
>> > causes this error:
>> > Undefined symbols for architecture x86_64:
>> > "boost::gregorian::greg_month::get_month_map_ptr()", referenced from:
>> > unsigned short
>> >
>> > boost::date_time::month_str_to_ushort<boost::gregorian::greg_month>(std::string
>> > const&) in boost2-aLwtLt.o
>> > ld: symbol(s) not found for architecture x86_64
>>
>>
>> Can you show the linker line? Do you link Boost.DateTime library?

> Here is the linker line:
> "/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.8.0
> -o boost2 /var/folders/hj/zc5pjqjd6gxgq2sw77xghkyh0000gn/T/boost2-JeVfpE.o
> -lstdc++ -lSystem /usr/bin/../lib/clang/4.1/lib/darwin/libclang_rt.osx.a
>
> No, I do not explicitly link to to Boost.DateTime. date_from_iso_string()
> works fine without linking, so I do not think it is required.

Please, read the manual:
http://www.boost.org/doc/libs/1_53_0/doc/html/date_time/details.html#date_time.buildinfo


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