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")