Opened 10 years ago
Closed 10 years ago
#7185 closed Bugs (fixed)
Header only chrono requires library
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | Boost 1.51.0 | Component: | chrono |
Version: | Boost 1.50.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Documentation for including chrono.hpp: http://www.boost.org/doc/libs/1_50_0/doc/html/chrono/users_guide.html
implies that chrono can be configured as a 'header only library', by defining BOOST_CHRONO_HEADER_ONLY, but on VC9, I get a link error: cannot open file 'libboost_system-vc90-mt-gd-1_50.lib
Adding a define for BOOST_ALL_NO_LIB results in two undefined objects: class boost::system::error_category const & cdecl boost::system::generic_category(void) class boost::system::error_category const & cdecl boost::system::system_category(void)
Change History (8)
follow-up: 2 comment:1 by , 10 years ago
comment:2 by , 10 years ago
Replying to DanSearles@…:
Added a define for less documented BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING, but still get the generic_category and system_category undefines
The macro is documented here http://www.boost.org/doc/libs/1_50_0/doc/html/chrono/reference.html#chrono.reference.cpp0x.chrono_chrono_hpp.conf.
Please could you tell me which .cpp file has the undefined symbols?
comment:3 by , 10 years ago
There is another possibility, please could you try BOOST_ERROR_CODE_HEADER_ONLY?
comment:4 by , 10 years ago
Status: | new → assigned |
---|
comment:5 by , 10 years ago
I tried adding #define BOOST_ERROR_CODE_HEADER_ONLY and was able to compile and build without linker errors. The 'Fix' appears to be to just mention in the docs these needed defines, for the chrono header only version.
comment:6 by , 10 years ago
So the final set that worked was: #define BOOST_ERROR_CODE_HEADER_ONLY #define BOOST_ALL_NO_LIB #define BOOST_CHRONO_HEADER_ONLY #define BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
comment:7 by , 10 years ago
Milestone: | To Be Determined → Boost 1.51.0 |
---|
Committed in trunk revision 80043.
Added a define for less documented BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING, but still get the generic_category and system_category undefines