linker error when using from_simple_string()
Hello, 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_ushortboost::gregorian::greg_month(std::string const&) in boost2-aLwtLt.o ld: symbol(s) not found for architecture x86_64 Any help will be appreciated. Thanks. Regards, Phil
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_ushortboost::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.
Thanks,
Phil
On Sun, Mar 17, 2013 at 6:44 AM, Igor R
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_ushortboost::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? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
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_ushortboost::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_ti...
I read the the page. Unfortunately, I saw nothing that was helpful. I am
new to boost, so I perhaps missed it.
I did a full install at the time I put boost on my MacBook. Therefore, I
expect the libs are there. What am I missing?
Thanks.
On Sun, Mar 17, 2013 at 2:02 PM, Igor R
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_ushortboost::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_ti... _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
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_ushortboost::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_ti...
I read the the page. Unfortunately, I saw nothing that was helpful. I am new to boost, so I perhaps missed it.
I did a full install at the time I put boost on my MacBook. Therefore, I expect the libs are there. What am I missing?
You should link this library. Add -lboost_date_time to the linker options.
That solved the problem. Thanks.
On Sun, Mar 17, 2013 at 3:18 PM, Igor R
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_ushortboost::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_ti...
I read the the page. Unfortunately, I saw nothing that was helpful. I am new to boost, so I perhaps missed it.
I did a full install at the time I put boost on my MacBook. Therefore, I expect the libs are there. What am I missing?
You should link this library. Add -lboost_date_time to the linker options. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Igor R
-
Phil Huffman