seetalib问题记录

在arch上完全没有问题的faceTest.cpp,到了centos7上报错

seetalib/lib/libviplnet.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
seetalib/lib/libviplnet.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const@GLIBCXX_3.4.21'
seetalib/lib/libviplnet.so: undefined reference to `vtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
seetalib/lib/libseeta_fa_lib.so: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8'
seetalib/lib/libviplnet.so: undefined reference to `VTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
seetalib/lib/libseeta_facedet_lib.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21'
seetalib/lib/libviplnet.so: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()@GLIBCXX_3.4.21'
seetalib/lib/libviplnet.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::swap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@GLIBCXX_3.4.21'
seetalib/lib/libviplnet.so: undefined reference to `vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'

其中,make.sh如下,相比arch上删除了libopencv_?(包含imread等函数),这里是opencv版本差异造成的

另外在centos7上,lib的路径为 /usr/lib64/

#!/bin/bash
 g++ faceTest.cpp -o face -Lseetalib/lib -lseeta_fa_lib -lseeta_facedet_lib -lviplnet -L/usr/lib64/ -lopencv_core -lopencv_highgui -lopencv_imgproc  -std=c++11

错误原因应为centos7上gcc和变异seetalib库文件的gcc版本不一致,c++11和老版本的命名多了__cxx11,在centos7上不能识别。但是yum更新不了gcc。按stackoverflow上的方法添加宏定义也并没有起作用。另外想起当时在centos上编译识别模块好像是出了问题没有编译成功,这个库应该是不能用的,可能和这个有关系。

待解决。


猜你喜欢

转载自blog.csdn.net/ftstic/article/details/80082670