c++ - Boost.Log 的链接器错误
问题描述
我在编译和链接程序时尝试使用 boost logger,如下所示,我收到以下错误。我的操作系统是 macOSHighSierra v10.13.4,我的 boost 版本是 1.67.0
非常感谢任何帮助
g++ -g -m64 -DBOOST_LOG_DYN_LINK -c -I/usr/local/include -I../../include -o build/stayClassification.o main.cpp
g++ -DBOOST_ALL_DYN_LINK -g -m64 -L/usr/local/lib -o build/stayClassification build/stayClassification.o -lboost_filesystem-mt -lboost_system-mt -lCGAL -lpthread -lboost_log_setup-mt -lboost_log-mt -lboost_thread-mt -lboost_date_time-mt -lgmp -lmpfr -lboost_iostreams-mt
Undefined symbols for architecture x86_64:
"void boost::log::v2_mt_posix::aux::put_integer<char>(boost::log::v2_mt_posix::aux::basic_ostringstreambuf<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, unsigned int, char)", referenced from:
"boost::log::v2_mt_posix::aux::code_convert_impl(wchar_t const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned long, std::locale const&)", referenced from:
ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status
解决方案
推荐阅读
- python - Plotly:如何将分类变量插入平行坐标图中?
- sql - 在 postgresql 上还原数据时,触发器(用于生成的代码)会产生错误
- c++ - 如何使用 get/set 方法在子对象中更改其父类成员变量的值?
- prometheus - Alertmanager 通知尝试失败,稍后将重试用户名和密码不被接受
- python-3.x - 在 sqlite 数据库中仅从日期开始获取月份
- angular - Anonymous user login using firebase with angular and spring boot
- python - 输入内部的参数
- php - 在php中堆叠/合并两个svg图像
- typescript - 如何使用 typescript、next-redux-wrapper、getServerSideProps?
- java - 如何在 Java 中将 $1319.2295689273974 舍入到 1319.23?