paddleocr的cpp_infer在Liunx下编译部署

sh tools/build.sh

CMake Error at CMakeLists.txt:47 (find_package):

Could not find a package configuration file provided by "OpenCV" with any

of the following names:

OpenCVConfig.cmake

opencv-config.cmake

Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set

"OpenCV_DIR" to a directory containing one of the above files. If "OpenCV"

provides a separate development package or SDK, be sure it has been

installed.

修改:

OPENCV_DIR=opencv3.4.7/opencv3 #不在编译的build下
LIB_DIR=your_paddle_inference_dir

报错

cc1plus: error: too many filenames given; type ‘cc1plus --help’ for usage
cc1plus: fatal error: CMakeFiles/ppocr.dir/src/main.cpp.d: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/ppocr.dir/src/main.cpp.o] Error 1
cc1plus: error: too many filenames given; type ‘cc1plus --help’ for usage
cc1plus: fatal error: CMakeFiles/ppocr.dir/src/paddleocr.cpp.d: No such file or directory
compilation terminated.
cc1plus: error: too many filenames given; type ‘cc1plus --help’ for usage
cc1plus: error: too many filenames given; type ‘cc1plus --help’ for usage
cc1plus: fatal error: CMakeFiles/ppocr.dir/src/ocr_cls.cpp.d: No such file or directory
cc1plus: error: too many filenames given; type ‘cc1plus --help’ for usage
compilation terminated.
cc1plus: fatal error: CMakeFiles/ppocr.dir/src/preprocess_op.cpp.d: No such file or directory
compilation terminated.
cc1plus: error: too many filenames given; type ‘cc1plus --help’ for usage
cc1plus: fatal error: CMakeFiles/ppocr.dir/src/paddlestructure.cpp.d: No such file or directory
compilation terminated.
cc1plus: fatal error: CMakeFiles/ppocr.dir/src/args.cpp.d: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/ppocr.dir/src/paddleocr.cpp.o] Error 1cc1plus: error: too many filenames given; type ‘cc1plus --help’ for usage
cc1plus: error: too many filenames given; type ‘cc1plus --help’ for usage

cc1plus: error: too many filenames given; type ‘cc1plus --help’ for usage
cc1plus: fatal error: CMakeFiles/ppocr.dir/src/ocr_det.cpp.d: No such file or directory
cc1plus: fatal error: CMakeFiles/ppocr.dir/src/ocr_rec.cpp.d: No such file or directory
make[2]: *** [CMakeFiles/ppocr.dir/src/preprocess_op.cpp.o] Error 1compilation terminated.
compilation terminated.

make[2]: cc1plus: fatal error: CMakeFiles/ppocr.dir/src/postprocess_op.cpp.d: No such file or directory
*** [CMakeFiles/ppocr.dir/src/ocr_cls.cpp.o] Error 1
compilation terminated.
make[2]: *** [CMakeFiles/ppocr.dir/src/args.cpp.o] Error 1
make[2]: *** [CMakeFiles/ppocr.dir/src/paddlestructure.cpp.o] Error 1
cc1plus: error: too many filenames given; type ‘cc1plus --help’ for usage
cc1plus: error: too many filenames given; type ‘cc1plus --help’ for usage
make[2]: cc1plus: fatal error: CMakeFiles/ppocr.dir/src/structure_layout.cpp.d: No such file or directory
*** [CMakeFiles/ppocr.dir/src/postprocess_op.cpp.o] Error 1
compilation terminated.
cc1plus: error: too many filenames given; type ‘cc1plus --help’ for usage
make[2]: *** [CMakeFiles/ppocr.dir/src/ocr_rec.cpp.o] Error 1cc1plus: fatal error: CMakeFiles/ppocr.dir/src/structure_table.cpp.d: No such file or directory

make[2]: compilation terminated.
*** [CMakeFiles/ppocr.dir/src/ocr_det.cpp.o] Error 1
cc1plus: fatal error: CMakeFiles/ppocr.dir/src/utility.cpp.d: No such file or directory
compilation terminated.
cc1plus: error: too many filenames given; type ‘cc1plus --help’ for usage
make[2]: *** [CMakeFiles/ppocr.dir/src/structure_layout.cpp.o] Error 1
cc1plus: fatal error: CMakeFiles/ppocr.dir/src/clipper.cpp.d: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/ppocr.dir/src/structure_table.cpp.o] Error 1
make[2]: *** [CMakeFiles/ppocr.dir/src/utility.cpp.o] Error 1
make[2]: *** [CMakeFiles/ppocr.dir/src/clipper.cpp.o] Error 1
make[1]: *** [CMakeFiles/ppocr.dir/all] Error 2
make: *** [all] Error 2

cpp_infer/CMakeLists.txt 74行

将 "-o3" 改成 "-O3" 就可以了,修改后的结果如下,

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 ${FLAG_OPENMP} -std=c++11")

  • 8
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值