szad670401 / HyperLPR

基于深度学习高性能中文车牌识别 High Performance Chinese License Plate Recognition Framework.
Apache License 2.0
5.68k stars 2.01k forks source link

linux上C编译报错undefined reference to `std::__cxx11::basic_ostringstream #362

Closed l132hi closed 1 year ago

l132hi commented 1 year ago

在ubuntu上安装c++安装流程,编译好库后,编译测试用例会报错 /HyperLPR-master/3rdparty_hyper_inspire_op/opencv-4.5.1/linux/lib/libopencv_core.a(ocl.cpp.o): In function cv::ocl::OpenCLExecutionContext::Impl::useOpenCL()': ocl.cpp:(.text._ZN2cv3ocl22OpenCLExecutionContext4Impl9useOpenCLEv[_ZN2cv3ocl22OpenCLExecutionContext4Impl9useOpenCLEv]+0x103): undefined reference tostd::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::basic_stringstream()' 尝试更新gcc添加-lstdc++没有效果,用qt运行编译程序也会报相同的错 HyperLPR-master/build/linux/install/hyperlpr3/lib/libhyperlpr3.so:-1: error: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits, std::allocator >::basic_ostringstream()

l132hi commented 1 year ago

已经解决,原因是原本编译的库环境应该高一点,我用的ubuntu18,用的gcc7跟glibc2.27库版本不够,升到gcc9和glibc2.29可以解决

tunmx commented 1 year ago

好的,谢谢提供解决方案,我们会在文档中添加这个注意事项