boost log庫鏈接問題

1. 使用動態庫時,要定義 BOOST_LOG_DYN_LINK  或者 BOOST_ALL_DYN_LINK

否則會出現如下錯誤:

CMakeFiles/IrcChatData.dir/src/main.cpp.o: In function `boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::logger, boost::log::v2s_mt_posix::sources::single_thread_model>::~basic_logger()':
/usr/local/boost/include/boost/log/sources/basic_logger.hpp:79: undefined reference to `boost::log::v2s_mt_posix::attribute_set::~attribute_set()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `config::init_logging(boost::asio::io_context&)':
/root/projects/IrcChatData/src/config.cpp:74: undefined reference to `boost::log::v2s_mt_posix::core::get()'
/root/projects/IrcChatData/src/config.cpp:74: undefined reference to `boost::log::v2s_mt_posix::core::add_sink(boost::shared_ptr<boost::log::v2s_mt_posix::sinks::sink> const&)'
/root/projects/IrcChatData/src/config.cpp:77: undefined reference to `boost::log::v2s_mt_posix::core::get()'
/root/projects/IrcChatData/src/config.cpp:77: undefined reference to `boost::log::v2s_mt_posix::core::set_filter(boost::log::v2s_mt_posix::filter const&)'
/root/projects/IrcChatData/src/config.cpp:81: undefined reference to `boost::log::v2s_mt_posix::core::get()'
/root/projects/IrcChatData/src/config.cpp:81: undefined reference to `boost::log::v2s_mt_posix::core::add_sink(boost::shared_ptr<boost::log::v2s_mt_posix::sinks::sink> const&)'
/root/projects/IrcChatData/src/config.cpp:83: undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()'
/root/projects/IrcChatData/src/config.cpp:83: undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `config::rotate_log(boost::system::error_code const&, int)':
/root/projects/IrcChatData/src/config.cpp:91: undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()'
/root/projects/IrcChatData/src/config.cpp:91: undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()'
/root/projects/IrcChatData/src/config.cpp:94: undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o:/root/projects/IrcChatData/src/config.cpp:94: more undefined references to `boost::log::v2s_mt_posix::trivial::logger::get()' follow
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `config::rotate_log(boost::system::error_code const&, int)':
/root/projects/IrcChatData/src/config.cpp:95: undefined reference to `boost::log::v2s_mt_posix::sinks::text_file_backend::rotate_file()'
/root/projects/IrcChatData/src/config.cpp:96: undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()'
/root/projects/IrcChatData/src/config.cpp:96: undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attribute_name::attribute_name(char const*)':
/usr/local/boost/include/boost/log/attributes/attribute_name.hpp:80: undefined reference to `boost::log::v2s_mt_posix::attribute_name::get_id_from_string(char const*)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attribute::impl::~impl()':
/usr/local/boost/include/boost/log/attributes/attribute.hpp:75: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attribute::impl::~impl()':
/usr/local/boost/include/boost/log/attributes/attribute.hpp:75: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::intrusive_ptr_release(boost::log::v2s_mt_posix::record_view::public_data const*)':
/usr/local/boost/include/boost/log/core/record_view.hpp:93: undefined reference to `boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data const*)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::record::reset()':
/usr/local/boost/include/boost/log/core/record.hpp:157: undefined reference to `boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data const*)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::aux::once_block_sentry::~once_block_sentry()':
/usr/local/boost/include/boost/log/utility/once_block.hpp:86: undefined reference to `boost::log::v2s_mt_posix::aux::once_block_sentry::rollback()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::aux::once_block_sentry::executed() const':
/usr/local/boost/include/boost/log/utility/once_block.hpp:91: undefined reference to `boost::log::v2s_mt_posix::aux::once_block_sentry::enter_once_block() const'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::expressions::tag::message::get_name()':
/usr/local/boost/include/boost/log/expressions/message.hpp:56: undefined reference to `boost::log::v2s_mt_posix::aux::default_attribute_names::message()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::expressions::tag::smessage::get_name()':
/usr/local/boost/include/boost/log/expressions/message.hpp:70: undefined reference to `boost::log::v2s_mt_posix::aux::default_attribute_names::message()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::sinks::unbounded_fifo_queue::unbounded_fifo_queue()':
/usr/local/boost/include/boost/log/sinks/unbounded_fifo_queue.hpp:71: undefined reference to `boost::log::v2s_mt_posix::aux::futex_based_event::futex_based_event()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::sinks::unbounded_fifo_queue::enqueue(boost::log::v2s_mt_posix::record_view const&)':
/usr/local/boost/include/boost/log/sinks/unbounded_fifo_queue.hpp:84: undefined reference to `boost::log::v2s_mt_posix::aux::futex_based_event::set_signalled()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::sinks::unbounded_fifo_queue::dequeue_ready(boost::log::v2s_mt_posix::record_view&)':
/usr/local/boost/include/boost/log/sinks/unbounded_fifo_queue.hpp:117: undefined reference to `boost::log::v2s_mt_posix::aux::futex_based_event::wait()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::sinks::unbounded_fifo_queue::interrupt_dequeue()':
/usr/local/boost/include/boost/log/sinks/unbounded_fifo_queue.hpp:129: undefined reference to `boost::log::v2s_mt_posix::aux::futex_based_event::set_signalled()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::current_process_id::current_process_id()':
/usr/local/boost/include/boost/log/attributes/current_process_id.hpp:49: undefined reference to `boost::log::v2s_mt_posix::aux::this_process::get_id()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::current_thread_id::impl::dispatch(boost::log::v2s_mt_posix::type_dispatcher&)':
/usr/local/boost/include/boost/log/attributes/current_thread_id.hpp:69: undefined reference to `boost::log::v2s_mt_posix::aux::this_thread::get_id()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::current_thread_id::impl::detach_from_thread()':
/usr/local/boost/include/boost/log/attributes/current_thread_id.hpp:79: undefined reference to `boost::log::v2s_mt_posix::aux::this_thread::get_id()'
/usr/local/boost/include/boost/log/attributes/current_thread_id.hpp:79: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator new(unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attribute_value::impl::~impl()':
/usr/local/boost/include/boost/log/attributes/attribute_value.hpp:73: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attribute_value::impl::~impl()':
/usr/local/boost/include/boost/log/attributes/attribute_value.hpp:73: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::current_thread_id::current_thread_id()':
/usr/local/boost/include/boost/log/attributes/current_thread_id.hpp:89: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator new(unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::add_common_attributes()':
/usr/local/boost/include/boost/log/utility/setup/common_attributes.hpp:53: undefined reference to `boost::log::v2s_mt_posix::core::get()'
/usr/local/boost/include/boost/log/utility/setup/common_attributes.hpp:56: undefined reference to `boost::log::v2s_mt_posix::aux::default_attribute_names::line_id()'
/usr/local/boost/include/boost/log/utility/setup/common_attributes.hpp:56: undefined reference to `boost::log::v2s_mt_posix::core::add_global_attribute(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute const&)'
/usr/local/boost/include/boost/log/utility/setup/common_attributes.hpp:59: undefined reference to `boost::log::v2s_mt_posix::aux::default_attribute_names::timestamp()'
/usr/local/boost/include/boost/log/utility/setup/common_attributes.hpp:59: undefined reference to `boost::log::v2s_mt_posix::core::add_global_attribute(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute const&)'
/usr/local/boost/include/boost/log/utility/setup/common_attributes.hpp:62: undefined reference to `boost::log::v2s_mt_posix::aux::default_attribute_names::process_id()'
/usr/local/boost/include/boost/log/utility/setup/common_attributes.hpp:62: undefined reference to `boost::log::v2s_mt_posix::core::add_global_attribute(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute const&)'
/usr/local/boost/include/boost/log/utility/setup/common_attributes.hpp:66: undefined reference to `boost::log::v2s_mt_posix::aux::default_attribute_names::thread_id()'
/usr/local/boost/include/boost/log/utility/setup/common_attributes.hpp:66: undefined reference to `boost::log::v2s_mt_posix::core::add_global_attribute(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute const&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::aux::threadsafe_queue<boost::log::v2s_mt_posix::record_view, std::allocator<void> >::threadsafe_queue(std::allocator<boost::log::v2s_mt_posix::aux::threadsafe_queue_node<boost::log::v2s_mt_posix::record_view> > const&)':
/usr/local/boost/include/boost/log/detail/threadsafe_queue.hpp:171: undefined reference to `boost::log::v2s_mt_posix::aux::threadsafe_queue_impl::create(boost::log::v2s_mt_posix::aux::threadsafe_queue_impl::node_base*)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::constant<boost::log::v2s_mt_posix::aux::id<boost::log::v2s_mt_posix::aux::process> >::constant(boost::log::v2s_mt_posix::aux::id<boost::log::v2s_mt_posix::aux::process>&&)':
/usr/local/boost/include/boost/log/attributes/constant.hpp:80: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator new(unsigned long)'
/usr/local/boost/include/boost/log/attributes/constant.hpp:80: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::counter<unsigned int>::counter(unsigned int, unsigned int)':
/usr/local/boost/include/boost/log/attributes/counter.hpp:97: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator new(unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::basic_clock<boost::log::v2s_mt_posix::attributes::local_time_traits>::basic_clock()':
/usr/local/boost/include/boost/log/attributes/clock.hpp:71: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator new(unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_composite_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex>, boost::log::v2s_mt_posix::sources::features<boost::log::v2s_mt_posix::sources::severity<boost::log::v2s_mt_posix::trivial::severity_level> > >::open_record<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&)':
/usr/local/boost/include/boost/log/sources/basic_logger.hpp:456: undefined reference to `boost::log::v2s_mt_posix::core::get_logging_enabled() const'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::~record_pump()':
/usr/local/boost/include/boost/log/sources/record_ostream.hpp:526: undefined reference to `boost::log::v2s_mt_posix::aux::unhandled_exception_count()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::attribute_value_impl<boost::log::v2s_mt_posix::aux::id<boost::log::v2s_mt_posix::aux::process> >::~attribute_value_impl()':
/usr/local/boost/include/boost/log/attributes/attribute_value_impl.hpp:48: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::attribute_value_impl<boost::log::v2s_mt_posix::aux::id<boost::log::v2s_mt_posix::aux::process> >::~attribute_value_impl()':
/usr/local/boost/include/boost/log/attributes/attribute_value_impl.hpp:48: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::logger, boost::log::v2s_mt_posix::sources::single_thread_model>::basic_logger()':
/usr/local/boost/include/boost/log/sources/basic_logger.hpp:135: undefined reference to `boost::log::v2s_mt_posix::core::get()'
/usr/local/boost/include/boost/log/sources/basic_logger.hpp:135: undefined reference to `boost::log::v2s_mt_posix::attribute_set::attribute_set()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::sinks::unbounded_fifo_queue::~unbounded_fifo_queue()':
/usr/local/boost/include/boost/log/sinks/unbounded_fifo_queue.hpp:56: undefined reference to `boost::log::v2s_mt_posix::aux::futex_based_event::~futex_based_event()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::shared_ptr<boost::log::v2s_mt_posix::sinks::synchronous_sink<boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char> > > boost::log::v2s_mt_posix::aux::add_console_log<char, boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::format, char const [24]> >(std::basic_ostream<char, std::char_traits<char> >&, boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::format, char const [24]> const&)':
/usr/local/boost/include/boost/log/utility/setup/console.hpp:67: undefined reference to `boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>::add_stream(boost::shared_ptr<std::ostream> const&)'
/usr/local/boost/include/boost/log/utility/setup/console.hpp:68: undefined reference to `boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>::auto_flush(bool)'
/usr/local/boost/include/boost/log/utility/setup/console.hpp:79: undefined reference to `boost::log::v2s_mt_posix::core::get()'
/usr/local/boost/include/boost/log/utility/setup/console.hpp:79: undefined reference to `boost::log::v2s_mt_posix::core::add_sink(boost::shared_ptr<boost::log::v2s_mt_posix::sinks::sink> const&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>&, boost::log::v2s_mt_posix::record&)':
/usr/local/boost/include/boost/log/sources/record_ostream.hpp:506: undefined reference to `boost::log::v2s_mt_posix::aux::stream_provider<char>::allocate_compound(boost::log::v2s_mt_posix::record&)'
/usr/local/boost/include/boost/log/sources/record_ostream.hpp:507: undefined reference to `boost::log::v2s_mt_posix::aux::unhandled_exception_count()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::auto_release::~auto_release()':
/usr/local/boost/include/boost/log/sources/record_ostream.hpp:491: undefined reference to `boost::log::v2s_mt_posix::aux::stream_provider<char>::release_compound(boost::log::v2s_mt_posix::aux::stream_provider<char>::stream_compound*)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::detail::sp_if_not_array<boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char> >::type boost::make_shared<boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>>()':
/usr/local/boost/include/boost/smart_ptr/make_shared_object.hpp:256: undefined reference to `boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>::basic_text_ostream_backend()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `void boost::log::v2s_mt_posix::sinks::text_file_backend::construct<boost::parameter::aux::arg_list<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::auto_flush, bool const>, boost::parameter::aux::arg_list<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::file_name, std::string>, boost::parameter::aux::arg_list<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::open_mode, std::_Ios_Openmode const>, boost::parameter::aux::empty_arg_list> > > >(boost::parameter::aux::arg_list<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::auto_flush, bool const>, boost::parameter::aux::arg_list<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::file_name, std::string>, boost::parameter::aux::arg_list<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::open_mode, std::_Ios_Openmode const>, boost::parameter::aux::empty_arg_list> > > const&)':
/usr/local/boost/include/boost/log/sinks/text_file_backend.hpp:542: undefined reference to `boost::log::v2s_mt_posix::sinks::text_file_backend::construct(boost::filesystem::path const&, std::_Ios_Openmode, unsigned long, boost::log::v2s_mt_posix::aux::light_function<bool ()> const&, bool, bool)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::sources::aux::severity_level<boost::log::v2s_mt_posix::trivial::severity_level>::set_value(boost::log::v2s_mt_posix::trivial::severity_level)':
/usr/local/boost/include/boost/log/sources/severity_feature.hpp:135: undefined reference to `boost::log::v2s_mt_posix::sources::aux::get_severity_level()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex> >::open_record_unlocked<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&)':
/usr/local/boost/include/boost/log/sources/basic_logger.hpp:259: undefined reference to `boost::log::v2s_mt_posix::core::open_record(boost::log::v2s_mt_posix::attribute_set const&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::core::push_record(boost::log::v2s_mt_posix::record&&)':
/usr/local/boost/include/boost/log/core/core.hpp:308: undefined reference to `boost::log::v2s_mt_posix::core::push_record_move(boost::log::v2s_mt_posix::record&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `void boost::log::v2s_mt_posix::aux::parse_date_time_format<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::log::v2s_mt_posix::aux::date_time_format_parser_callback<char>&)':
/usr/local/boost/include/boost/log/detail/date_time_format_parser.hpp:462: undefined reference to `void boost::log::v2s_mt_posix::aux::parse_date_time_format<char>(char const*, char const*, boost::log::v2s_mt_posix::aux::date_time_format_parser_callback<char>&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::sinks::asynchronous_sink<boost::log::v2s_mt_posix::sinks::text_file_backend, boost::log::v2s_mt_posix::sinks::unbounded_fifo_queue>::scoped_thread_id::scoped_thread_id(boost::log::v2s_mt_posix::aux::light_rw_mutex&, boost::condition_variable_any&, boost::thread::id&, boost::atomics::atomic<bool>&)':
/usr/local/boost/include/boost/log/sinks/async_frontend.hpp:148: undefined reference to `boost::log::v2s_mt_posix::unexpected_call::throw_(char const*, unsigned long, char const*)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `void boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::feed_record<boost::recursive_mutex, boost::log::v2s_mt_posix::sinks::text_file_backend>(boost::log::v2s_mt_posix::record_view const&, boost::recursive_mutex&, boost::log::v2s_mt_posix::sinks::text_file_backend&)':
/usr/local/boost/include/boost/log/sinks/basic_sink_frontend.hpp:463: undefined reference to `boost::log::v2s_mt_posix::sinks::text_file_backend::consume(boost::log::v2s_mt_posix::record_view const&, std::string const&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::basic_formatter<char> boost::log::v2s_mt_posix::parse_formatter<char>(char const*)':
/usr/local/boost/include/boost/log/utility/setup/formatter_parser.hpp:207: undefined reference to `boost::log::v2s_mt_posix::basic_formatter<char> boost::log::v2s_mt_posix::parse_formatter<char>(char const*, char const*)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::detail::sp_ms_deleter<boost::log::v2s_mt_posix::sinks::text_file_backend>::destroy()':
/usr/local/boost/include/boost/smart_ptr/make_shared_object.hpp:59: undefined reference to `boost::log::v2s_mt_posix::sinks::text_file_backend::~text_file_backend()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `std::basic_ostream<char, std::char_traits<char> >& boost::log::v2s_mt_posix::trivial::operator<< <char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, boost::log::v2s_mt_posix::trivial::severity_level)':
/usr/local/boost/include/boost/log/trivial.hpp:59: undefined reference to `boost::log::v2s_mt_posix::trivial::to_string(boost::log::v2s_mt_posix::trivial::severity_level)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `void boost::log::v2s_mt_posix::sinks::basic_sink_frontend::flush_backend_impl<boost::recursive_mutex, boost::log::v2s_mt_posix::sinks::text_file_backend>(boost::recursive_mutex&, boost::log::v2s_mt_posix::sinks::text_file_backend&, mpl_::bool_<true>)':
/usr/local/boost/include/boost/log/sinks/basic_sink_frontend.hpp:230: undefined reference to `boost::log::v2s_mt_posix::sinks::text_file_backend::flush()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::detail::sp_ms_deleter<boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char> >::destroy()':
/usr/local/boost/include/boost/smart_ptr/make_shared_object.hpp:59: undefined reference to `boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>::~basic_text_ostream_backend()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::visitation_result boost::log::v2s_mt_posix::value_visitor_invoker<boost::mpl::vector2<std::string, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::log::v2s_mt_posix::fallback_to_none>::operator()<boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::output_fun, boost::log::v2s_mt_posix::expressions::aux::stream_ref<boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> > >&> >(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&, boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::output_fun, boost::log::v2s_mt_posix::expressions::aux::stream_ref<boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> > >&>) const':
/usr/local/boost/include/boost/log/attributes/value_visitation.hpp:182: undefined reference to `boost::log::v2s_mt_posix::attribute_value_set::find(boost::log::v2s_mt_posix::attribute_name) const'
/usr/local/boost/include/boost/log/attributes/value_visitation.hpp:183: undefined reference to `boost::log::v2s_mt_posix::attribute_value_set::end() const'
/usr/local/boost/include/boost/log/attributes/value_visitation.hpp:191: undefined reference to `boost::log::v2s_mt_posix::aux::attach_attribute_name_info(boost::exception&, boost::log::v2s_mt_posix::attribute_name const&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const':
/usr/local/boost/include/boost/log/attributes/value_extraction.hpp:232: undefined reference to `boost::log::v2s_mt_posix::attribute_value_set::find(boost::log::v2s_mt_posix::attribute_name) const'
/usr/local/boost/include/boost/log/attributes/value_extraction.hpp:233: undefined reference to `boost::log::v2s_mt_posix::attribute_value_set::end() const'
/usr/local/boost/include/boost/log/attributes/value_extraction.hpp:241: undefined reference to `boost::log::v2s_mt_posix::aux::attach_attribute_name_info(boost::exception&, boost::log::v2s_mt_posix::attribute_name const&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::array<std::pair<boost::typeindex::stl_type_index, void*>, 2ul> const& boost::log::v2s_mt_posix::aux::type_sequence_dispatcher<boost::mpl::vector2<std::string, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::get_dispatching_map<boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::output_fun, boost::log::v2s_mt_posix::expressions::aux::stream_ref<boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> > >&> >()':
/usr/local/boost/include/boost/log/utility/type_dispatch/static_type_dispatcher.hpp:182: undefined reference to `boost::log::v2s_mt_posix::aux::once_block_sentry::commit()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::value_extractor<std::string, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::expressions::tag::smessage>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const':
/usr/local/boost/include/boost/log/attributes/value_extraction.hpp:232: undefined reference to `boost::log::v2s_mt_posix::attribute_value_set::find(boost::log::v2s_mt_posix::attribute_name) const'
/usr/local/boost/include/boost/log/attributes/value_extraction.hpp:233: undefined reference to `boost::log::v2s_mt_posix::attribute_value_set::end() const'
/usr/local/boost/include/boost/log/attributes/value_extraction.hpp:241: undefined reference to `boost::log::v2s_mt_posix::aux::attach_attribute_name_info(boost::exception&, boost::log::v2s_mt_posix::attribute_name const&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::visitation_result boost::log::v2s_mt_posix::value_visitor_invoker<boost::posix_time::ptime, boost::log::v2s_mt_posix::fallback_to_none>::operator()<boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::aux::light_function<void (boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >&, boost::posix_time::ptime const&)> const&, boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >&> >(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&, boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::aux::light_function<void (boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >&, boost::posix_time::ptime const&)> const&, boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >&>) const':
/usr/local/boost/include/boost/log/attributes/value_visitation.hpp:182: undefined reference to `boost::log::v2s_mt_posix::attribute_value_set::find(boost::log::v2s_mt_posix::attribute_name) const'
/usr/local/boost/include/boost/log/attributes/value_visitation.hpp:183: undefined reference to `boost::log::v2s_mt_posix::attribute_value_set::end() const'
/usr/local/boost/include/boost/log/attributes/value_visitation.hpp:191: undefined reference to `boost::log::v2s_mt_posix::aux::attach_attribute_name_info(boost::exception&, boost::log::v2s_mt_posix::attribute_name const&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::enable_if_c<(boost::log::v2s_mt_posix::aux::is_character_type<wchar_t>::value&&boost::log::v2s_mt_posix::aux::is_character_type<char>::value)&&((sizeof (wchar_t))!=(sizeof (char))), bool>::type boost::log::v2s_mt_posix::aux::code_convert<wchar_t, char, std::char_traits<char>, std::allocator<char> >(wchar_t const*, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned long, std::locale const&)':
/usr/local/boost/include/boost/log/detail/code_conversion.hpp:133: undefined reference to `boost::log::v2s_mt_posix::aux::code_convert_impl(wchar_t const*, unsigned long, std::string&, unsigned long, std::locale const&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::basic_clock<boost::log::v2s_mt_posix::attributes::local_time_traits>::impl::~impl()':
/usr/local/boost/include/boost/log/attributes/clock.hpp:57: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::basic_clock<boost::log::v2s_mt_posix::attributes::local_time_traits>::impl::~impl()':
/usr/local/boost/include/boost/log/attributes/clock.hpp:57: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::counter<unsigned int>::impl::~impl()':
/usr/local/boost/include/boost/log/attributes/counter.hpp:59: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::counter<unsigned int>::impl::~impl()':
/usr/local/boost/include/boost/log/attributes/counter.hpp:59: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::constant<boost::log::v2s_mt_posix::aux::id<boost::log::v2s_mt_posix::aux::process> >::impl::~impl()':
/usr/local/boost/include/boost/log/attributes/constant.hpp:55: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o:/usr/local/boost/include/boost/log/attributes/constant.hpp:55: more undefined references to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)' follow
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::basic_clock<boost::log::v2s_mt_posix::attributes::local_time_traits>::impl::get_value()':
/usr/local/boost/include/boost/log/attributes/clock.hpp:63: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator new(unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::format_short_year(boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::context&)':
/usr/local/boost/include/boost/log/detail/decomposed_time.hpp:227: undefined reference to `void boost::log::v2s_mt_posix::aux::put_integer<char>(boost::log::v2s_mt_posix::aux::basic_ostringstreambuf<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, unsigned int, char)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::format_full_year(boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::context&)':
/usr/local/boost/include/boost/log/detail/decomposed_time.hpp:222: undefined reference to `void boost::log::v2s_mt_posix::aux::put_integer<char>(boost::log::v2s_mt_posix::aux::basic_ostringstreambuf<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, unsigned int, char)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::format_numeric_month(boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::context&)':
/usr/local/boost/include/boost/log/detail/decomposed_time.hpp:232: undefined reference to `void boost::log::v2s_mt_posix::aux::put_integer<char>(boost::log::v2s_mt_posix::aux::basic_ostringstreambuf<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, unsigned int, char)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `void boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::format_month_day<(char)48>(boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::context&)':
/usr/local/boost/include/boost/log/detail/decomposed_time.hpp:238: undefined reference to `void boost::log::v2s_mt_posix::aux::put_integer<char>(boost::log::v2s_mt_posix::aux::basic_ostringstreambuf<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, unsigned int, char)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `void boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::format_month_day<(char)32>(boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::context&)':
/usr/local/boost/include/boost/log/detail/decomposed_time.hpp:238: undefined reference to `void boost::log::v2s_mt_posix::aux::put_integer<char>(boost::log::v2s_mt_posix::aux::basic_ostringstreambuf<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, unsigned int, char)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o:/usr/local/boost/include/boost/log/detail/decomposed_time.hpp:243: more undefined references to `void boost::log::v2s_mt_posix::aux::put_integer<char>(boost::log::v2s_mt_posix::aux::basic_ostringstreambuf<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, unsigned int, char)' follow
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attribute_value boost::log::v2s_mt_posix::attributes::make_attribute_value<unsigned int&>(unsigned int&)':
/usr/local/boost/include/boost/log/attributes/attribute_value_impl.hpp:108: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator new(unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `void boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::feed_record<boost::recursive_mutex, boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char> >(boost::log::v2s_mt_posix::record_view const&, boost::recursive_mutex&, boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>&)':
/usr/local/boost/include/boost/log/sinks/basic_sink_frontend.hpp:463: undefined reference to `boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>::consume(boost::log::v2s_mt_posix::record_view const&, std::string const&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::sinks::asynchronous_sink<boost::log::v2s_mt_posix::sinks::text_file_backend, boost::log::v2s_mt_posix::sinks::unbounded_fifo_queue>::scoped_thread_id::scoped_thread_id(boost::unique_lock<boost::log::v2s_mt_posix::aux::light_rw_mutex>&, boost::condition_variable_any&, boost::thread::id&, boost::atomics::atomic<bool>&)':
/usr/local/boost/include/boost/log/sinks/async_frontend.hpp:157: undefined reference to `boost::log::v2s_mt_posix::unexpected_call::throw_(char const*, unsigned long, char const*)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `void boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::feed_record<boost::log::v2s_mt_posix::aux::fake_mutex, boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char> >(boost::log::v2s_mt_posix::record_view const&, boost::log::v2s_mt_posix::aux::fake_mutex&, boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>&)':
/usr/local/boost/include/boost/log/sinks/basic_sink_frontend.hpp:463: undefined reference to `boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>::consume(boost::log::v2s_mt_posix::record_view const&, std::string const&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `void boost::log::v2s_mt_posix::sinks::basic_sink_frontend::flush_backend_impl<boost::recursive_mutex, boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char> >(boost::recursive_mutex&, boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>&, mpl_::bool_<true>)':
/usr/local/boost/include/boost/log/sinks/basic_sink_frontend.hpp:230: undefined reference to `boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>::flush()'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `bool boost::detail::lexical_ostream_limited_src<char, std::char_traits<char> >::shr_using_base_class<boost::log::v2s_mt_posix::trivial::severity_level>(boost::log::v2s_mt_posix::trivial::severity_level&)':
/usr/local/boost/include/boost/lexical_cast/detail/converter_lexical_streams.hpp:600: undefined reference to `std::basic_istream<char, std::char_traits<char> >& boost::log::v2s_mt_posix::trivial::operator>><char, std::char_traits<char> >(std::basic_istream<char, std::char_traits<char> >&, boost::log::v2s_mt_posix::trivial::severity_level&)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::attribute_value_impl<unsigned int>::~attribute_value_impl()':
/usr/local/boost/include/boost/log/attributes/attribute_value_impl.hpp:48: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::attribute_value_impl<unsigned int>::~attribute_value_impl()':
/usr/local/boost/include/boost/log/attributes/attribute_value_impl.hpp:48: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::attribute_value_impl<boost::posix_time::ptime>::~attribute_value_impl()':
/usr/local/boost/include/boost/log/attributes/attribute_value_impl.hpp:48: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
CMakeFiles/IrcChatData.dir/src/config.cpp.o: In function `boost::log::v2s_mt_posix::attributes::attribute_value_impl<boost::posix_time::ptime>::~attribute_value_impl()':
/usr/local/boost/include/boost/log/attributes/attribute_value_impl.hpp:48: undefined reference to `boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
collect2: error: ld returned 1 exit status
make[3]: *** [IrcChatData] Error 1
make[2]: *** [CMakeFiles/IrcChatData.dir/all] Error 2
make[1]: *** [CMakeFiles/IrcChatData.dir/rule] Error 2
make: *** [IrcChatData] Error 2

2. 使用靜態庫時,注意 libboost_log_setup.a和libboost_log.a 兩個庫的順序, 正確的順序是 libboost_log_setup.a 應該在 libboost_log.a 之前.

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章