升压记录仪连接问题 [英] Boost logger linking issue

查看:137
本文介绍了升压记录仪连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写它采用Boost库的程序。我曾与链接和使用程序选项没有问题,但我似乎无法使升压日志正常工作。
谁能告诉我,我缺少什么?

jamroot.jam

 使用铛:::其中,compileflags> -Isrc /主/头< compileflags> -std = C ++ 11 LT; compileflags> -stdlib =的libc ++< LINKFLAGS> -std = C ++ 11<&LINKFLAGS GT; -stdlib =的libc ++;
LIB boost_program_options boost_log;
EXE雾笛:[水珠的src / main / CPP / * CPP] boost_program_options boost_log;

这是我收到的错误:

  \"boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data常量*),从引用:
      提高::登录:: v2s_mt_posix ::记录::在main.o中复位()
  提振::登录:: v2s_mt_posix :: attribute_set ::插入(::提高::登录:: v2s_mt_posix ATTRIBUTE_NAME,提振::登录:: v2s_mt_posix ::属性const&安培;),从引用:
      提高::登录:: v2s_mt_posix ::来源:: basic_logger<焦炭,提振::登录:: v2s_mt_posix ::来源:: severity_logger< ESeverityLevel>中boost::log::v2s_mt_posix::sources::single_thread_model>::add_attribute_unlocked(boost::log::v2s_mt_posix::attribute_name常量和放大器;,提振::登录:: v2s_mt_posix ::属性const&放大器;)在main.o中
      boost::log::v2s_mt_posix::aux::attribute_set_reference_proxy::operator=(boost::log::v2s_mt_posix::attribute常量和放大器;在main.o中)常量
  提振::登录:: v2s_mt_posix :: attribute_set :: attribute_set(升压::登录:: v2s_mt_posix :: attribute_set常量和放大器;),从引用:
      提高::登录:: v2s_mt_posix ::来源:: basic_logger&LT;焦炭,提振::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&gt;中boost::log::v2s_mt_posix::sources::single_thread_model>::basic_logger(boost::log::v2s_mt_posix::sources::basic_logger<char,提高::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&gt;中的boost ::登录:: v2s_mt_posix ::来源:: single_thread_model&GT;常量和放大器;)在main.o中
  提振::登录:: v2s_mt_posix :: attribute_set :: attribute_set(),从引用:
      提高::登录:: v2s_mt_posix ::来源:: basic_logger&LT;焦炭,提振::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&gt;中的boost ::登录:: v2s_mt_posix ::来源:: single_thread_model&GT; :: basic_logger ()在main.o中
  提振::登录:: v2s_mt_posix :: attribute_set ::〜attribute_set(),从引用:
      提高::登录:: v2s_mt_posix ::来源:: basic_logger&LT;焦炭,提振::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&gt;中的boost ::登录:: v2s_mt_posix ::来源:: single_thread_model&GT; ::〜 basic_logger()在main.o中
  提振::登录:: v2s_mt_posix :: ATTRIBUTE_NAME :: get_id_from_string(字符常量*),从引用:
      提振::在main.o中记录:: v2s_mt_posix :: ATTRIBUTE_NAME :: ATTRIBUTE_NAME(字符常量*)
  无效的boost ::登录:: v2s_mt_posix :: init_from_stream&LT;烧焦&GT;(STD :: __ 1 :: basic_istream&LT;焦炭,性病:: __ 1 :: char_traits&LT;焦炭&GT;&GT;&安培;),从引用:
      __ZL13gvLoggingInitPKc在main.o中
  提振::登录:: v2s_mt_posix :: AUX :: this_thread :: get_id(),从引用:
      boost::log::v2s_mt_posix::attributes::current_thread_id::impl::dispatch(boost::log::v2s_mt_posix::type_dispatcher&)在main.o中
      提高::登录:: v2s_mt_posix :: :: current_thread_id :: IMPL :: detach_from_thread()在main.o中属性
  提振::登录:: v2s_mt_posix :: AUX :: this_process :: get_id(),从引用:
      提高::登录:: v2s_mt_posix :: :: current_process_id :: current_process_id()在main.o中属性
  \"boost::log::v2s_mt_posix::aux::stream_provider<char>::release_compound(boost::log::v2s_mt_posix::aux::stream_provider<char>::stream_compound*)\",从引用:
      boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel> &GT; :: auto_release ::〜auto_release()在main.o中
  \"boost::log::v2s_mt_posix::aux::stream_provider<char>::allocate_compound(boost::log::v2s_mt_posix::record&)\",从引用:
      boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel> &GT; :: record_pump(升压::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&GT;&放;,提振::登录:: v2s_mt_posix ::记录和放大器;)在main.o中
  提振::登录:: v2s_mt_posix :: AUX :: get_process_name(),从引用:
      提高::登录:: v2s_mt_posix ::属性:: current_process_name :: current_process_name()在main.o中
  提振::登录:: v2s_mt_posix :: AUX :: once_block_sentry ::提交(),从引用:
      boost::log::v2s_mt_posix::aux::lazy_singleton<boost::log::v2s_mt_posix::sources::aux::logger_singleton<SLogger>, boost::shared_ptr<boost::log::v2s_mt_posix::sources::aux::logger_holder<boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel> &GT; &GT; &GT; ::得到()在main.o中
  提振::登录:: v2s_mt_posix :: AUX :: once_block_sentry ::回滚(),从引用:
      提高::登录:: v2s_mt_posix :: AUX :: once_block_sentry ::〜once_block_sentry()在main.o中
  提振::登录:: v2s_mt_posix :: AUX :: default_attribute_names ::严重性(),从引用:
      boost::log::v2s_mt_posix::sources::basic_severity_logger<boost::log::v2s_mt_posix::sources::basic_logger<char,提高::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&gt;中的boost ::登录:: v2s_mt_posix ::来源:: single_thread_model&gt;中ESeverityLevel&GT; :: basic_severity_logger()在main.o中
      boost::log::v2s_mt_posix::sources::basic_severity_logger<boost::log::v2s_mt_posix::sources::basic_logger<char,提高::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&gt;中的boost ::登录:: v2s_mt_posix ::来源:: single_thread_model&gt;中ESeverityLevel>::basic_severity_logger(boost::log::v2s_mt_posix::sources::basic_severity_logger<boost::log::v2s_mt_posix::sources::basic_logger<char,提高::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&gt;中的boost ::登录:: v2s_mt_posix ::来源:: single_thread_model&gt;中ESeverityLevel&GT;常量和放大器;)在main.o中
  提振::登录:: v2s_mt_posix :: AUX :: unhandled_exception_count(),从引用:
      boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel> &GT; ::〜record_pump()在main.o中
      boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel> &GT; :: record_pump(升压::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&GT;&放;,提振::登录:: v2s_mt_posix ::记录和放大器;)在main.o中
  提振::登录:: v2s_mt_posix :: AUX :: attach_attribute_name_info(升压::例外&放;,提振::登录:: v2s_mt_posix :: ATTRIBUTE_NAME常量和放大器;),从引用:
      提高::登录:: v2s_mt_posix :: value_extractor&LT; ESeverityLevel,提振::登录:: v2s_mt_posix :: fallback_to_none,标签::严重程度和GT; ::运算符()(升压::登录:: v2s_mt_posix :: ATTRIBUTE_NAME常量和放大器;,提升: :登录:: v2s_mt_posix :: attribute_value_set常量和放大器;)在main.o中常量
  提振::登录:: v2s_mt_posix ::核心:: set_filter(升压::登录:: v2s_mt_posix ::过滤器常量和放大器;),从引用:
      __ZL13gvLoggingInitPKc在main.o中
  提振::登录:: v2s_mt_posix ::核心:: open_record(升压::登录:: v2s_mt_posix :: attribute_set常量和放大器;),从引用:
      提高::登录:: v2s_mt_posix ::纪录的boost ::登录:: v2s_mt_posix ::来源:: basic_logger&LT;焦炭,提振::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&gt;中boost::log::v2s_mt_posix::sources::single_thread_model>::open_record_unlocked<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, ESeverityLevel常量&GT; &GT;(升压::参数:: AUX :: tagged_argument&LT;提高::登录:: v2s_mt_posix ::关键词:标签::严重性,ESeverityLevel常量&GT;常量和放大器;)在main.o中
  提振::登录:: v2s_mt_posix ::核心:: push_record_move(升压::登录:: v2s_mt_posix ::记录和放大器;),从引用:
      提高::登录:: v2s_mt_posix ::来源:: basic_logger&LT;焦炭,提振::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&gt;中boost::log::v2s_mt_posix::sources::single_thread_model>::push_record_unlocked(boost::log::v2s_mt_posix::record&&)在main.o中
  提振::登录:: v2s_mt_posix ::核心:: add_global_attribute(的boost ::登录:: v2s_mt_posix :: ATTRIBUTE_NAME常量和放大器;,提振::登录:: v2s_mt_posix ::属性const&安培;),从引用:
      __ZL13gvLoggingInitPKc在main.o中
  提振::登录:: v2s_mt_posix ::核心::得到(),从引用:
      __ZL13gvLoggingInitPKc在main.o中
      提高::登录:: v2s_mt_posix ::来源:: basic_logger&LT;焦炭,提振::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&gt;中的boost ::登录:: v2s_mt_posix ::来源:: single_thread_model&GT; :: basic_logger ()在main.o中
      提高::登录:: v2s_mt_posix ::来源:: basic_logger&LT;焦炭,提振::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&gt;中boost::log::v2s_mt_posix::sources::single_thread_model>::basic_logger(boost::log::v2s_mt_posix::sources::basic_logger<char,提高::登录:: v2s_mt_posix ::来源:: severity_logger&LT; ESeverityLevel&gt;中的boost ::登录:: v2s_mt_posix ::来源:: single_thread_model&GT;常量和放大器;)在main.o中
  提振::登录:: v2s_mt_posix ::来源:: AUX :: global_storage :: get_or_init(的std :: TYPE_INFO常量和放大器;,的boost :: shared_ptr的&LT;提高::登录:: v2s_mt_posix ::来源:: AUX :: logger_holder_base&GT; (*)()),从参考:
      提高::登录:: v2s_mt_posix ::来源:: AUX :: logger_singleton&LT;匍行兽&GT; ::在main.o中init_instance()
  提振::登录:: v2s_mt_posix ::来源:: AUX :: get_severity_level(),从引用:
      boost::log::v2s_mt_posix::sources::aux::severity_level<ESeverityLevel>::set_value(ESeverityLevel)在main.o中
      boost::log::v2s_mt_posix::sources::aux::severity_level<ESeverityLevel>::impl::dispatch(boost::log::v2s_mt_posix::type_dispatcher&)在main.o中
      boost::log::v2s_mt_posix::sources::aux::severity_level<ESeverityLevel>::impl::detach_from_thread()在main.o中
  提振::登录:: v2s_mt_posix ::来源:: AUX :: throw_odr_violation(的std :: TYPE_INFO常量和放大器;,的std :: TYPE_INFO常量和放大器;,提振::登录:: v2s_mt_posix ::来源:: AUX :: logger_holder_base常量和放大器; ),从引用:
      提高::登录:: v2s_mt_posix ::来源:: AUX :: logger_singleton&LT;匍行兽&GT; ::在main.o中init_instance()
  提振::登录:: v2s_mt_posix ::属性:: IMPL :: delete操作符(无效*,无符号长),从引用:
      提高::登录:: v2s_mt_posix ::来源:: AUX :: severity_level&LT; ESeverityLevel&GT; ::在main.o中severity_level()
      提高::登录:: v2s_mt_posix ::来源:: AUX :: severity_level&LT; ESeverityLevel&gt;在main.o中:: IMPL ::〜IMPL()
      boost::log::v2s_mt_posix::sources::aux::severity_level<ESeverityLevel>::impl::detach_from_thread()在main.o中
      boost::log::v2s_mt_posix::attributes::attribute_value_impl<ESeverityLevel>::~attribute_value_impl()在main.o中
      提振::在main.o中记录:: v2s_mt_posix :: ATTRIBUTE_VALUE :: IMPL ::〜IMPL()
      提高::登录:: v2s_mt_posix ::属性:: IMPL ::〜IMPL()在main.o中
      提高::登录:: v2s_mt_posix :: :: current_thread_id :: current_thread_id()在main.o中属性
      ...
  提振::登录:: v2s_mt_posix ::属性:: IMPL ::运营商新的(无符号长),从引用:
      提高::登录:: v2s_mt_posix ::来源:: AUX :: severity_level&LT; ESeverityLevel&GT; ::在main.o中severity_level()
      boost::log::v2s_mt_posix::sources::aux::severity_level<ESeverityLevel>::impl::detach_from_thread()在main.o中
      提高::登录:: v2s_mt_posix :: :: current_thread_id :: current_thread_id()在main.o中属性
      提高::登录:: v2s_mt_posix :: :: current_thread_id :: IMPL :: detach_from_thread()在main.o中属性
      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>&&)在main.o中
      提高::登录:: v2s_mt_posix ::属性::恒定LT;的std :: __ 1 :: basic_string的&LT;焦炭,性病:: __ 1 :: char_traits&LT;焦炭&gt;中的std :: __ 1 ::分配器&LT;焦炭&GT; &GT;在main.o中&GT; ::常数(STD :: __ 1 :: basic_string的&LT;焦炭,性病:: __ 1 :: char_traits&LT;焦炭&gt;中的std :: __ 1 ::分配器&LT;烧焦&GT;&GT;&安培;&AMP)
      boost::log::v2s_mt_posix::attributes::basic_clock<boost::log::v2s_mt_posix::attributes::local_time_traits>::basic_clock()在main.o中
      ...
  提振::系统:: system_category(),从引用:
      ___cxx_global_var_init2在main.o中
  提振::系统:: generic_category(),从引用:
      ___cxx_global_var_init在main.o中
      ___cxx_global_var_init1在main.o中
  提振::登录:: v2s_mt_posix :: attribute_value_set ::结束()const的,从引用:
      提高::登录:: v2s_mt_posix :: value_extractor&LT; ESeverityLevel,提振::登录:: v2s_mt_posix :: fallback_to_none,标签::严重程度和GT; ::运算符()(升压::登录:: v2s_mt_posix :: ATTRIBUTE_NAME常量和放大器;,提升: :登录:: v2s_mt_posix :: attribute_value_set常量和放大器;)在main.o中常量
  提振::登录:: v2s_mt_posix :: attribute_value_set ::寻找(提振::登录:: v2s_mt_posix :: ATTRIBUTE_NAME)常量,从引用:
      提高::登录:: v2s_mt_posix :: value_extractor&LT; ESeverityLevel,提振::登录:: v2s_mt_posix :: fallback_to_none,标签::严重程度和GT; ::运算符()(升压::登录:: v2s_mt_posix :: ATTRIBUTE_NAME常量和放大器;,提升: :登录:: v2s_mt_posix :: attribute_value_set常量和放大器;)在main.o中常量
  提振::登录:: v2s_mt_posix :: AUX :: once_block_sentry :: enter_once_block()const的,从引用:
      提高::登录:: v2s_mt_posix :: AUX :: once_block_sentry ::执行()在main.o中常量
  提振::登录:: v2s_mt_posix ::核心:: get_logging_enabled()const的,从引用:
      __ZN5boost3log12v2s_mt_posix7sources22basic_composite_loggerIcNS2_15severity_loggerI14ESeverityLevelEENS2_19single_thread_modelENS2_8featuresIJNS2_8severityIS5_EEEEEE11open_recordINS_9parameter3aux15tagged_argumentINS1_8keywords3tag8severityEKS5_EEEENS1_6recordERKT_在main.o中
LD:符号(S)未找到x86_64的架构
铿锵:错误:连接命令,退出code 1(使用-v看看调用)失败    铛++-o斌/铛 - 达尔文-4.2.1 /调试/雾笛,斌/铛 - 达尔文-4.2.1 /调试/ src目录/主/ CPP / complement.o斌/铛,darwin- 4.2.1 /调试/ src目录/主/ CPP / degenerate.o斌/铛 - 达尔文-4.2.1 /调试/ src目录/主/ CPP / fastq.o斌/铛 - 达尔文-4.2.1 /调试/ src目录/主/ CPP / fastq_reader.o斌/铛 - 达尔文-4.2.1 /调试/ src目录/主/ CPP / interleave.o斌/铛 - 达尔文-4.2.1 /调试/ src目录/主/ CPP / interval_reader.o斌/铛 - 达尔文-4.2.1 /调试/ src目录/主/ CPP / interval_reader_test_tool.o斌/铛 - 达尔文-4.2.1 /调试/ src目录/主/ CPP / main.o中的bin /铛 - 达尔文-4.2.1 /调试/ src目录/主/ CPP / oligo_designer.o斌/铛 - 达尔文-4.2.1 /调试/ src目录/主/ CPP / reference_reader.o 斌/铛 - 达尔文-4.2.1 /调试/ src目录/主/ CPP / reference_reader_test_tool.o斌/铛 - 达尔文-4.2.1 /调试/ src目录/主/ CPP / sequence_utils.o斌/铛-darwin-4.2.1 /调试/ src目录/主/ CPP / tool.o-lboost_log -lboost_program_options -g -std = C ++ 11 -stdlib = ++的libc...失败clang-darwin.link斌/铛 - 达尔文-4.2.1 /调试/雾笛...
...未能更新1目标...
...更新13项指标中...


解决方案

我有同样的问题,在我的情况的问题是,我已经助推只有动态库编译,忘了定义 BOOST_ALL_DYN_LINK

<一个href=\"http://www.boost.org/doc/libs/1_54_0/libs/log/doc/html/log/rationale/namespace_mangling.html\">http://www.boost.org/doc/libs/1_54_0/libs/log/doc/html/log/rationale/namespace_mangling.html

作为测试,尝试编译

<一个href=\"http://www.boost.org/doc/libs/1_54_0/libs/log/example/doc/tutorial_fmt_stream.cpp\">http://www.boost.org/doc/libs/1_54_0/libs/log/example/doc/tutorial_fmt_stream.cpp

的#include&LT;升压/日志/支持/ date_time.hpp方式&gt; 应加入,这个例子坏)

,并添加的#define BOOST_LOG_DYN_LINK

我可以编译 G ++ tutorial_fmt_stream.cpp -Wall -L $ BOOST / lib中/ -I $ BOOST的例子/有/ -pthread -lboost_system -lboost_log_setup -lboost_log -lboost_date_time -lboost_thread -lrt - lboost_filesystem

I am writing a program which uses Boost libraries. I had no problems with linking and using program options but I can't seem to make boost log working correctly. Could anyone tell me what am I missing?

jamroot.jam

using clang : : : <compileflags>-Isrc/main/headers <compileflags>-std=c++11 <compileflags>-stdlib=libc++ <linkflags>-std=c++11 <linkflags>-stdlib=libc++ ;
lib boost_program_options boost_log ;
exe foghorn : [ glob src/main/cpp/*.cpp ] boost_program_options boost_log ;

This is the error I am getting:

  "boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data const*)", referenced from:
      boost::log::v2s_mt_posix::record::reset() in main.o
  "boost::log::v2s_mt_posix::attribute_set::insert(boost::log::v2s_mt_posix::attribute_name, boost::log::v2s_mt_posix::attribute const&)", referenced from:
      boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>, boost::log::v2s_mt_posix::sources::single_thread_model>::add_attribute_unlocked(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute const&) in main.o
      boost::log::v2s_mt_posix::aux::attribute_set_reference_proxy::operator=(boost::log::v2s_mt_posix::attribute const&) const in main.o
  "boost::log::v2s_mt_posix::attribute_set::attribute_set(boost::log::v2s_mt_posix::attribute_set const&)", referenced from:
      boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>, boost::log::v2s_mt_posix::sources::single_thread_model>::basic_logger(boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>, boost::log::v2s_mt_posix::sources::single_thread_model> const&) in main.o
  "boost::log::v2s_mt_posix::attribute_set::attribute_set()", referenced from:
      boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>, boost::log::v2s_mt_posix::sources::single_thread_model>::basic_logger() in main.o
  "boost::log::v2s_mt_posix::attribute_set::~attribute_set()", referenced from:
      boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>, boost::log::v2s_mt_posix::sources::single_thread_model>::~basic_logger() in main.o
  "boost::log::v2s_mt_posix::attribute_name::get_id_from_string(char const*)", referenced from:
      boost::log::v2s_mt_posix::attribute_name::attribute_name(char const*) in main.o
  "void boost::log::v2s_mt_posix::init_from_stream<char>(std::__1::basic_istream<char, std::__1::char_traits<char> >&)", referenced from:
      __ZL13gvLoggingInitPKc in main.o
  "boost::log::v2s_mt_posix::aux::this_thread::get_id()", referenced from:
      boost::log::v2s_mt_posix::attributes::current_thread_id::impl::dispatch(boost::log::v2s_mt_posix::type_dispatcher&) in main.o
      boost::log::v2s_mt_posix::attributes::current_thread_id::impl::detach_from_thread() in main.o
  "boost::log::v2s_mt_posix::aux::this_process::get_id()", referenced from:
      boost::log::v2s_mt_posix::attributes::current_process_id::current_process_id() in main.o
  "boost::log::v2s_mt_posix::aux::stream_provider<char>::release_compound(boost::log::v2s_mt_posix::aux::stream_provider<char>::stream_compound*)", referenced from:
      boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel> >::auto_release::~auto_release() in main.o
  "boost::log::v2s_mt_posix::aux::stream_provider<char>::allocate_compound(boost::log::v2s_mt_posix::record&)", referenced from:
      boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel> >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>&, boost::log::v2s_mt_posix::record&) in main.o
  "boost::log::v2s_mt_posix::aux::get_process_name()", referenced from:
      boost::log::v2s_mt_posix::attributes::current_process_name::current_process_name() in main.o
  "boost::log::v2s_mt_posix::aux::once_block_sentry::commit()", referenced from:
      boost::log::v2s_mt_posix::aux::lazy_singleton<boost::log::v2s_mt_posix::sources::aux::logger_singleton<SLogger>, boost::shared_ptr<boost::log::v2s_mt_posix::sources::aux::logger_holder<boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel> > > >::get() in main.o
  "boost::log::v2s_mt_posix::aux::once_block_sentry::rollback()", referenced from:
      boost::log::v2s_mt_posix::aux::once_block_sentry::~once_block_sentry() in main.o
  "boost::log::v2s_mt_posix::aux::default_attribute_names::severity()", referenced from:
      boost::log::v2s_mt_posix::sources::basic_severity_logger<boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>, boost::log::v2s_mt_posix::sources::single_thread_model>, ESeverityLevel>::basic_severity_logger() in main.o
      boost::log::v2s_mt_posix::sources::basic_severity_logger<boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>, boost::log::v2s_mt_posix::sources::single_thread_model>, ESeverityLevel>::basic_severity_logger(boost::log::v2s_mt_posix::sources::basic_severity_logger<boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>, boost::log::v2s_mt_posix::sources::single_thread_model>, ESeverityLevel> const&) in main.o
  "boost::log::v2s_mt_posix::aux::unhandled_exception_count()", referenced from:
      boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel> >::~record_pump() in main.o
      boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel> >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>&, boost::log::v2s_mt_posix::record&) in main.o
  "boost::log::v2s_mt_posix::aux::attach_attribute_name_info(boost::exception&, boost::log::v2s_mt_posix::attribute_name const&)", referenced from:
      boost::log::v2s_mt_posix::value_extractor<ESeverityLevel, boost::log::v2s_mt_posix::fallback_to_none, tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in main.o
  "boost::log::v2s_mt_posix::core::set_filter(boost::log::v2s_mt_posix::filter const&)", referenced from:
      __ZL13gvLoggingInitPKc in main.o
  "boost::log::v2s_mt_posix::core::open_record(boost::log::v2s_mt_posix::attribute_set const&)", referenced from:
      boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>, boost::log::v2s_mt_posix::sources::single_thread_model>::open_record_unlocked<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, ESeverityLevel const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, ESeverityLevel const> const&) in main.o
  "boost::log::v2s_mt_posix::core::push_record_move(boost::log::v2s_mt_posix::record&)", referenced from:
      boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>, boost::log::v2s_mt_posix::sources::single_thread_model>::push_record_unlocked(boost::log::v2s_mt_posix::record&&) in main.o
  "boost::log::v2s_mt_posix::core::add_global_attribute(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute const&)", referenced from:
      __ZL13gvLoggingInitPKc in main.o
  "boost::log::v2s_mt_posix::core::get()", referenced from:
      __ZL13gvLoggingInitPKc in main.o
      boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>, boost::log::v2s_mt_posix::sources::single_thread_model>::basic_logger() in main.o
      boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>, boost::log::v2s_mt_posix::sources::single_thread_model>::basic_logger(boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<ESeverityLevel>, boost::log::v2s_mt_posix::sources::single_thread_model> const&) in main.o
  "boost::log::v2s_mt_posix::sources::aux::global_storage::get_or_init(std::type_info const&, boost::shared_ptr<boost::log::v2s_mt_posix::sources::aux::logger_holder_base> (*)())", referenced from:
      boost::log::v2s_mt_posix::sources::aux::logger_singleton<SLogger>::init_instance() in main.o
  "boost::log::v2s_mt_posix::sources::aux::get_severity_level()", referenced from:
      boost::log::v2s_mt_posix::sources::aux::severity_level<ESeverityLevel>::set_value(ESeverityLevel) in main.o
      boost::log::v2s_mt_posix::sources::aux::severity_level<ESeverityLevel>::impl::dispatch(boost::log::v2s_mt_posix::type_dispatcher&) in main.o
      boost::log::v2s_mt_posix::sources::aux::severity_level<ESeverityLevel>::impl::detach_from_thread() in main.o
  "boost::log::v2s_mt_posix::sources::aux::throw_odr_violation(std::type_info const&, std::type_info const&, boost::log::v2s_mt_posix::sources::aux::logger_holder_base const&)", referenced from:
      boost::log::v2s_mt_posix::sources::aux::logger_singleton<SLogger>::init_instance() in main.o
  "boost::log::v2s_mt_posix::attribute::impl::operator delete(void*, unsigned long)", referenced from:
      boost::log::v2s_mt_posix::sources::aux::severity_level<ESeverityLevel>::severity_level() in main.o
      boost::log::v2s_mt_posix::sources::aux::severity_level<ESeverityLevel>::impl::~impl() in main.o
      boost::log::v2s_mt_posix::sources::aux::severity_level<ESeverityLevel>::impl::detach_from_thread() in main.o
      boost::log::v2s_mt_posix::attributes::attribute_value_impl<ESeverityLevel>::~attribute_value_impl() in main.o
      boost::log::v2s_mt_posix::attribute_value::impl::~impl() in main.o
      boost::log::v2s_mt_posix::attribute::impl::~impl() in main.o
      boost::log::v2s_mt_posix::attributes::current_thread_id::current_thread_id() in main.o
      ...
  "boost::log::v2s_mt_posix::attribute::impl::operator new(unsigned long)", referenced from:
      boost::log::v2s_mt_posix::sources::aux::severity_level<ESeverityLevel>::severity_level() in main.o
      boost::log::v2s_mt_posix::sources::aux::severity_level<ESeverityLevel>::impl::detach_from_thread() in main.o
      boost::log::v2s_mt_posix::attributes::current_thread_id::current_thread_id() in main.o
      boost::log::v2s_mt_posix::attributes::current_thread_id::impl::detach_from_thread() in main.o
      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>&&) in main.o
      boost::log::v2s_mt_posix::attributes::constant<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::constant(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&) in main.o
      boost::log::v2s_mt_posix::attributes::basic_clock<boost::log::v2s_mt_posix::attributes::local_time_traits>::basic_clock() in main.o
      ...
  "boost::system::system_category()", referenced from:
      ___cxx_global_var_init2 in main.o
  "boost::system::generic_category()", referenced from:
      ___cxx_global_var_init in main.o
      ___cxx_global_var_init1 in main.o
  "boost::log::v2s_mt_posix::attribute_value_set::end() const", referenced from:
      boost::log::v2s_mt_posix::value_extractor<ESeverityLevel, boost::log::v2s_mt_posix::fallback_to_none, tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in main.o
  "boost::log::v2s_mt_posix::attribute_value_set::find(boost::log::v2s_mt_posix::attribute_name) const", referenced from:
      boost::log::v2s_mt_posix::value_extractor<ESeverityLevel, boost::log::v2s_mt_posix::fallback_to_none, tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in main.o
  "boost::log::v2s_mt_posix::aux::once_block_sentry::enter_once_block() const", referenced from:
      boost::log::v2s_mt_posix::aux::once_block_sentry::executed() const in main.o
  "boost::log::v2s_mt_posix::core::get_logging_enabled() const", referenced from:
      __ZN5boost3log12v2s_mt_posix7sources22basic_composite_loggerIcNS2_15severity_loggerI14ESeverityLevelEENS2_19single_thread_modelENS2_8featuresIJNS2_8severityIS5_EEEEEE11open_recordINS_9parameter3aux15tagged_argumentINS1_8keywords3tag8severityEKS5_EEEENS1_6recordERKT_ in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

    "clang++"   -o "bin/clang-darwin-4.2.1/debug/foghorn" "bin/clang-darwin-4.2.1/debug/src/main/cpp/complement.o" "bin/clang-darwin-4.2.1/debug/src/main/cpp/degenerate.o" "bin/clang-darwin-4.2.1/debug/src/main/cpp/fastq.o" "bin/clang-darwin-4.2.1/debug/src/main/cpp/fastq_reader.o" "bin/clang-darwin-4.2.1/debug/src/main/cpp/interleave.o" "bin/clang-darwin-4.2.1/debug/src/main/cpp/interval_reader.o" "bin/clang-darwin-4.2.1/debug/src/main/cpp/interval_reader_test_tool.o" "bin/clang-darwin-4.2.1/debug/src/main/cpp/main.o" "bin/clang-darwin-4.2.1/debug/src/main/cpp/oligo_designer.o" "bin/clang-darwin-4.2.1/debug/src/main/cpp/reference_reader.o" "bin/clang-darwin-4.2.1/debug/src/main/cpp/reference_reader_test_tool.o" "bin/clang-darwin-4.2.1/debug/src/main/cpp/sequence_utils.o" "bin/clang-darwin-4.2.1/debug/src/main/cpp/tool.o"  -lboost_log -lboost_program_options  -g -std=c++11 -stdlib=libc++

...failed clang-darwin.link bin/clang-darwin-4.2.1/debug/foghorn...
...failed updating 1 target...
...updated 13 targets...

解决方案

I had the same issue and in my case the problem was that I had boost compiled with dynamic libs only, and forgot to define BOOST_ALL_DYN_LINK.

http://www.boost.org/doc/libs/1_54_0/libs/log/doc/html/log/rationale/namespace_mangling.html

As a test, try to compile

http://www.boost.org/doc/libs/1_54_0/libs/log/example/doc/tutorial_fmt_stream.cpp

(#include <boost/log/support/date_time.hpp> should be added, the example is broken.)

and also add #define BOOST_LOG_DYN_LINK

I could compile the example with g++ tutorial_fmt_stream.cpp -Wall -L$BOOST/lib/ -I $BOOST/include/ -pthread -lboost_system -lboost_log_setup -lboost_log -lboost_date_time -lboost_thread -lrt -lboost_filesystem

这篇关于升压记录仪连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆