g++ -std=gnu++14 boost_date_time.cpp -omyapp -lboost_date_time -I /mnt/hgfs/liantong/code/01-common-2/include/cbb -L/mnt/hgfs/liantong/code/nvr-server/rtsp+onvif-server/./UncNVR/core
编译报错如下:
ore/libboost_date_time.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21’未定义的引用
t]# ldd /mnt/hgfs/liantong/code/nvr-server/rtsp+onvif-server/./UncNVR/core/libboost_date_time.so
/mnt/hgfs/liantong/code/nvr-server/rtsp+onvif-server/./UncNVR/core/libboost_date_time.so: /opt/lampp/lib/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /mnt/hgfs/liantong/code/nvr-server/rtsp+onvif-server/./UncNVR/core/libboost_date_time.so)
/mnt/hgfs/liantong/code/nvr-server/rtsp+onvif-server/./UncNVR/core/libboost_date_time.so: /opt/lampp/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /mnt/hgfs/liantong/code/nvr-server/rtsp+onvif-server/./UncNVR/core/libboost_date_time.so)
linux-vdso.so.1 => (0x00007ffe2d1e1000)
# strings /opt/lampp/lib/libstdc++.so.6 |grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBC_2.3
GLIBC_2.2.5
GLIBC_2.14
GLIBC_2.4
GLIBC_2.3.2
GLIBCXX_DEBUG_MESSAGE_LENGTH
yum whatprovides libstdc++.so.6
libstdc++-4.8.5-39.el7.i686 : GNU Standard C++ Libra
~]# rpm -qa | grep libstdc
devtoolset-8-libstdc++-devel-8.3.1-3.2.el7.x86_64
libstdc++-4.8.5-28.el7_5.1.x86_64
libstdc++-4.8.5-28.el7_5.1.i686
[root@localhost ~]#