opencv / opencv

Open Source Computer Vision Library
https://opencv.org
Apache License 2.0
78.38k stars 55.74k forks source link

How to package openCV into include header files and *.so dynamic libraries on Linux platform #15156

Closed Royzon closed 4 years ago

Royzon commented 5 years ago

I packaged my opencv3.4.3 as below successfully, but I encountered many error (at last) when I built my code.

opencv3/ ├── include │ ├── opencv │ │ ├── cvaux.h │ │ ├── cvaux.hpp │ │ ├── cv.h │ │ ├── cv.hpp │ │ ├── cvwimage.h │ │ ├── cxcore.h │ │ ├── cxcore.hpp │ │ ├── cxeigen.hpp │ │ ├── cxmisc.h │ │ ├── highgui.h │ │ └── ml.h │ └── opencv2 │ ├── aruco │ │ ├── charuco.hpp │ │ └── dictionary.hpp │ ├── aruco.hpp │ ├── bgsegm.hpp │ ├── bioinspired │ │ ├── bioinspired.hpp │ │ ├── retinafasttonemapping.hpp │ │ ├── retina.hpp │ │ └── transientareassegmentationmodule.hpp │ ├── bioinspired.hpp │ ├── calib3d │ │ ├── calib3d_c.h │ │ └── calib3d.hpp │ ├── calib3d.hpp │ ├── ccalib │ │ ├── multicalib.hpp │ │ ├── omnidir.hpp │ │ └── randpattern.hpp │ ├── ccalib.hpp │ ├── core │ │ ├── affine.hpp │ │ ├── base.hpp │ │ ├── bufferpool.hpp │ │ ├── check.hpp │ │ ├── core_c.h │ │ ├── core.hpp │ │ ├── cuda │ │ │ ├── block.hpp │ │ │ ├── border_interpolate.hpp │ │ │ ├── color.hpp │ │ │ ├── common.hpp │ │ │ ├── datamov_utils.hpp │ │ │ ├── detail │ │ │ │ ├── color_detail.hpp │ │ │ │ ├── reduce.hpp │ │ │ │ ├── reduce_key_val.hpp │ │ │ │ ├── transform_detail.hpp │ │ │ │ ├── type_traits_detail.hpp │ │ │ │ └── vec_distance_detail.hpp │ │ │ ├── dynamic_smem.hpp │ │ │ ├── emulation.hpp │ │ │ ├── filters.hpp │ │ │ ├── funcattrib.hpp │ │ │ ├── functional.hpp │ │ │ ├── limits.hpp │ │ │ ├── reduce.hpp │ │ │ ├── saturate_cast.hpp │ │ │ ├── scan.hpp │ │ │ ├── simd_functions.hpp │ │ │ ├── transform.hpp │ │ │ ├── type_traits.hpp │ │ │ ├── utility.hpp │ │ │ ├── vec_distance.hpp │ │ │ ├── vec_math.hpp │ │ │ ├── vec_traits.hpp │ │ │ ├── warp.hpp │ │ │ ├── warp_reduce.hpp │ │ │ └── warp_shuffle.hpp │ │ ├── cuda.hpp │ │ ├── cuda.inl.hpp │ │ ├── cuda_stream_accessor.hpp │ │ ├── cuda_types.hpp │ │ ├── cv_cpu_dispatch.h │ │ ├── cv_cpu_helper.h │ │ ├── cvdef.h │ │ ├── cvstd.hpp │ │ ├── cvstd.inl.hpp │ │ ├── directx.hpp │ │ ├── eigen.hpp │ │ ├── fast_math.hpp │ │ ├── hal │ │ │ ├── hal.hpp │ │ │ ├── interface.h │ │ │ ├── intrin_avx.hpp │ │ │ ├── intrin_cpp.hpp │ │ │ ├── intrin.hpp │ │ │ ├── intrin_neon.hpp │ │ │ ├── intrin_sse.hpp │ │ │ └── intrin_vsx.hpp │ │ ├── ippasync.hpp │ │ ├── mat.hpp │ │ ├── mat.inl.hpp │ │ ├── matx.hpp │ │ ├── neon_utils.hpp │ │ ├── ocl_genbase.hpp │ │ ├── ocl.hpp │ │ ├── opencl │ │ │ ├── ocl_defs.hpp │ │ │ ├── opencl_info.hpp │ │ │ ├── opencl_svm.hpp │ │ │ └── runtime │ │ │ ├── autogenerated │ │ │ │ ├── opencl_clamdblas.hpp │ │ │ │ ├── opencl_clamdfft.hpp │ │ │ │ ├── opencl_core.hpp │ │ │ │ ├── opencl_core_wrappers.hpp │ │ │ │ ├── opencl_gl.hpp │ │ │ │ └── opencl_gl_wrappers.hpp │ │ │ ├── opencl_clamdblas.hpp │ │ │ ├── opencl_clamdfft.hpp │ │ │ ├── opencl_core.hpp │ │ │ ├── opencl_core_wrappers.hpp │ │ │ ├── opencl_gl.hpp │ │ │ ├── opencl_gl_wrappers.hpp │ │ │ ├── opencl_svm_20.hpp │ │ │ ├── opencl_svm_definitions.hpp │ │ │ └── opencl_svm_hsa_extension.hpp │ │ ├── opengl.hpp │ │ ├── operations.hpp │ │ ├── optim.hpp │ │ ├── ovx.hpp │ │ ├── persistence.hpp │ │ ├── ptr.inl.hpp │ │ ├── saturate.hpp │ │ ├── softfloat.hpp │ │ ├── sse_utils.hpp │ │ ├── traits.hpp │ │ ├── types_c.h │ │ ├── types.hpp │ │ ├── utility.hpp │ │ ├── utils │ │ │ ├── filesystem.hpp │ │ │ ├── logger.defines.hpp │ │ │ ├── logger.hpp │ │ │ └── trace.hpp │ │ ├── va_intel.hpp │ │ ├── version.hpp │ │ ├── vsx_utils.hpp │ │ └── wimage.hpp │ ├── core_detect.hpp │ ├── core.hpp │ ├── cvconfig.h │ ├── datasets │ │ ├── ar_hmdb.hpp │ │ ├── ar_sports.hpp │ │ ├── dataset.hpp │ │ ├── fr_adience.hpp │ │ ├── fr_lfw.hpp │ │ ├── gr_chalearn.hpp │ │ ├── gr_skig.hpp │ │ ├── hpe_humaneva.hpp │ │ ├── hpe_parse.hpp │ │ ├── ir_affine.hpp │ │ ├── ir_robot.hpp │ │ ├── is_bsds.hpp │ │ ├── is_weizmann.hpp │ │ ├── msm_epfl.hpp │ │ ├── msm_middlebury.hpp │ │ ├── or_imagenet.hpp │ │ ├── or_mnist.hpp │ │ ├── or_pascal.hpp │ │ ├── or_sun.hpp │ │ ├── pd_caltech.hpp │ │ ├── pd_inria.hpp │ │ ├── slam_kitti.hpp │ │ ├── slam_tumindoor.hpp │ │ ├── track_alov.hpp │ │ ├── track_vot.hpp │ │ ├── tr_chars.hpp │ │ ├── tr_icdar.hpp │ │ ├── tr_svt.hpp │ │ └── util.hpp │ ├── dnn │ │ ├── all_layers.hpp │ │ ├── dict.hpp │ │ ├── dnn.hpp │ │ ├── dnn.inl.hpp │ │ ├── layer.details.hpp │ │ ├── layer.hpp │ │ └── shape_utils.hpp │ ├── dnn.hpp │ ├── dpm.hpp │ ├── face │ │ ├── bif.hpp │ │ ├── face_alignment.hpp │ │ ├── facemarkAAM.hpp │ │ ├── facemark.hpp │ │ ├── facemarkLBF.hpp │ │ ├── facemark_train.hpp │ │ ├── facerec.hpp │ │ ├── mace.hpp │ │ └── predict_collector.hpp │ ├── face.hpp │ ├── features2d │ │ ├── features2d.hpp │ │ └── hal │ │ └── interface.h │ ├── features2d.hpp │ ├── flann │ │ ├── all_indices.h │ │ ├── allocator.h │ │ ├── any.h │ │ ├── autotuned_index.h │ │ ├── composite_index.h │ │ ├── config.h │ │ ├── defines.h │ │ ├── dist.h │ │ ├── dummy.h │ │ ├── dynamic_bitset.h │ │ ├── flann_base.hpp │ │ ├── flann.hpp │ │ ├── general.h │ │ ├── ground_truth.h │ │ ├── hdf5.h │ │ ├── heap.h │ │ ├── hierarchical_clustering_index.h │ │ ├── index_testing.h │ │ ├── kdtree_index.h │ │ ├── kdtree_single_index.h │ │ ├── kmeans_index.h │ │ ├── linear_index.h │ │ ├── logger.h │ │ ├── lsh_index.h │ │ ├── lsh_table.h │ │ ├── matrix.h │ │ ├── miniflann.hpp │ │ ├── nn_index.h │ │ ├── object_factory.h │ │ ├── params.h │ │ ├── random.h │ │ ├── result_set.h │ │ ├── sampling.h │ │ ├── saving.h │ │ ├── simplex_downhill.h │ │ └── timer.h │ ├── flann.hpp │ ├── freetype.hpp │ ├── fuzzy │ │ ├── fuzzy_F0_math.hpp │ │ ├── fuzzy_F1_math.hpp │ │ ├── fuzzy_image.hpp │ │ └── types.hpp │ ├── fuzzy.hpp │ ├── hdf │ │ └── hdf5.hpp │ ├── hdf.hpp │ ├── hfs.hpp │ ├── highgui │ │ ├── highgui_c.h │ │ └── highgui.hpp │ ├── highgui.hpp │ ├── imgcodecs │ │ ├── imgcodecs_c.h │ │ ├── imgcodecs.hpp │ │ └── ios.h │ ├── imgcodecs.hpp │ ├── img_hash │ │ ├── average_hash.hpp │ │ ├── block_mean_hash.hpp │ │ ├── color_moment_hash.hpp │ │ ├── img_hash_base.hpp │ │ ├── marr_hildreth_hash.hpp │ │ ├── phash.hpp │ │ └── radial_variance_hash.hpp │ ├── img_hash.hpp │ ├── imgproc │ │ ├── detail │ │ │ └── distortion_model.hpp │ │ ├── hal │ │ │ ├── hal.hpp │ │ │ └── interface.h │ │ ├── imgproc_c.h │ │ ├── imgproc.hpp │ │ └── types_c.h │ ├── imgproc.hpp │ ├── line_descriptor │ │ └── descriptor.hpp │ ├── line_descriptor.hpp │ ├── ml │ │ ├── ml.hpp │ │ └── ml.inl.hpp │ ├── ml.hpp │ ├── objdetect │ │ ├── detection_based_tracker.hpp │ │ ├── objdetect_c.h │ │ └── objdetect.hpp │ ├── objdetect.hpp │ ├── opencv.hpp │ ├── opencv_modules.hpp │ ├── optflow │ │ ├── motempl.hpp │ │ ├── pcaflow.hpp │ │ └── sparse_matching_gpc.hpp │ ├── optflow.hpp │ ├── phase_unwrapping │ │ ├── histogramphaseunwrapping.hpp │ │ └── phase_unwrapping.hpp │ ├── phase_unwrapping.hpp │ ├── photo │ │ ├── cuda.hpp │ │ ├── photo_c.h │ │ └── photo.hpp │ ├── photo.hpp │ ├── plot.hpp │ ├── reg │ │ ├── mapaffine.hpp │ │ ├── map.hpp │ │ ├── mappergradaffine.hpp │ │ ├── mappergradeuclid.hpp │ │ ├── mappergradproj.hpp │ │ ├── mappergradshift.hpp │ │ ├── mappergradsimilar.hpp │ │ ├── mapper.hpp │ │ ├── mapperpyramid.hpp │ │ ├── mapprojec.hpp │ │ └── mapshift.hpp │ ├── rgbd │ │ └── linemod.hpp │ ├── rgbd.hpp │ ├── saliency │ │ ├── saliencyBaseClasses.hpp │ │ └── saliencySpecializedClasses.hpp │ ├── saliency.hpp │ ├── shape │ │ ├── emdL1.hpp │ │ ├── hist_cost.hpp │ │ ├── shape_distance.hpp │ │ ├── shape.hpp │ │ └── shape_transformer.hpp │ ├── shape.hpp │ ├── stereo │ │ ├── descriptor.hpp │ │ ├── matching.hpp │ │ └── stereo.hpp │ ├── stereo.hpp │ ├── stitching │ │ ├── detail │ │ │ ├── autocalib.hpp │ │ │ ├── blenders.hpp │ │ │ ├── camera.hpp │ │ │ ├── exposure_compensate.hpp │ │ │ ├── matchers.hpp │ │ │ ├── motion_estimators.hpp │ │ │ ├── seam_finders.hpp │ │ │ ├── timelapsers.hpp │ │ │ ├── util.hpp │ │ │ ├── util_inl.hpp │ │ │ ├── warpers.hpp │ │ │ └── warpers_inl.hpp │ │ └── warpers.hpp │ ├── stitching.hpp │ ├── structured_light │ │ ├── graycodepattern.hpp │ │ ├── sinusoidalpattern.hpp │ │ └── structured_light.hpp │ ├── structured_light.hpp │ ├── superres │ │ └── optical_flow.hpp │ ├── superres.hpp │ ├── surface_matching │ │ ├── icp.hpp │ │ ├── pose_3d.hpp │ │ ├── ppf_helpers.hpp │ │ ├── ppf_match_3d.hpp │ │ └── t_hash_int.hpp │ ├── surface_matching.hpp │ ├── text │ │ ├── erfilter.hpp │ │ ├── ocr.hpp │ │ └── textDetector.hpp │ ├── text.hpp │ ├── tracking │ │ ├── feature.hpp │ │ ├── kalman_filters.hpp │ │ ├── onlineBoosting.hpp │ │ ├── onlineMIL.hpp │ │ ├── tldDataset.hpp │ │ ├── tracker.hpp │ │ └── tracking.hpp │ ├── tracking.hpp │ ├── video │ │ ├── background_segm.hpp │ │ ├── tracking_c.h │ │ ├── tracking.hpp │ │ └── video.hpp │ ├── video.hpp │ ├── videoio │ │ ├── cap_ios.h │ │ ├── registry.hpp │ │ ├── videoio_c.h │ │ └── videoio.hpp │ ├── videoio.hpp │ ├── videostab │ │ ├── deblurring.hpp │ │ ├── fast_marching.hpp │ │ ├── fast_marching_inl.hpp │ │ ├── frame_source.hpp │ │ ├── global_motion.hpp │ │ ├── inpainting.hpp │ │ ├── log.hpp │ │ ├── motion_core.hpp │ │ ├── motion_stabilizing.hpp │ │ ├── optical_flow.hpp │ │ ├── outlier_rejection.hpp │ │ ├── ring_buffer.hpp │ │ ├── stabilizer.hpp │ │ └── wobble_suppression.hpp │ ├── videostab.hpp │ ├── xfeatures2d │ │ ├── cuda.hpp │ │ └── nonfree.hpp │ ├── xfeatures2d.hpp │ ├── ximgproc │ │ ├── brightedges.hpp │ │ ├── deriche_filter.hpp │ │ ├── disparity_filter.hpp │ │ ├── edgeboxes.hpp │ │ ├── edge_filter.hpp │ │ ├── estimated_covariance.hpp │ │ ├── fast_hough_transform.hpp │ │ ├── fast_line_detector.hpp │ │ ├── fourier_descriptors.hpp │ │ ├── lsc.hpp │ │ ├── paillou_filter.hpp │ │ ├── peilin.hpp │ │ ├── ridgefilter.hpp │ │ ├── seeds.hpp │ │ ├── segmentation.hpp │ │ ├── slic.hpp │ │ ├── sparse_match_interpolator.hpp │ │ ├── structured_edge_detection.hpp │ │ └── weighted_median_filter.hpp │ ├── ximgproc.hpp │ ├── xobjdetect.hpp │ ├── xphoto │ │ ├── bm3d_image_denoising.hpp │ │ ├── dct_image_denoising.hpp │ │ ├── inpainting.hpp │ │ └── white_balance.hpp │ └── xphoto.hpp └── lib ├── libopencv_aruco.so ├── libopencv_bgsegm.so ├── libopencv_bioinspired.so ├── libopencv_calib3d.so ├── libopencv_ccalib.so ├── libopencv_core.so ├── libopencv_datasets.so ├── libopencv_dnn_objdetect.so ├── libopencv_dnn.so ├── libopencv_dpm.so ├── libopencv_face.so ├── libopencv_features2d.so ├── libopencv_flann.so ├── libopencv_freetype.so ├── libopencv_fuzzy.so ├── libopencv_hdf.so ├── libopencv_hfs.so ├── libopencv_highgui.so ├── libopencv_imgcodecs.so ├── libopencv_img_hash.so ├── libopencv_imgproc.so ├── libopencv_line_descriptor.so ├── libopencv_ml.so ├── libopencv_objdetect.so ├── libopencv_optflow.so ├── libopencv_phase_unwrapping.so ├── libopencv_photo.so ├── libopencv_plot.so ├── libopencv_reg.so ├── libopencv_rgbd.so ├── libopencv_saliency.so ├── libopencv_shape.so ├── libopencv_stereo.so ├── libopencv_stitching.so ├── libopencv_structured_light.so ├── libopencv_superres.so ├── libopencv_surface_matching.so ├── libopencv_text.so ├── libopencv_tracking.so ├── libopencv_videoio.so ├── libopencv_video.so ├── libopencv_videostab.so ├── libopencv_xfeatures2d.so ├── libopencv_ximgproc.so ├── libopencv_xobjdetect.so └── libopencv_xphoto.so

those error: [ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o [100%] Linking CXX executable main CMakeFiles/main.dir/main.cpp.o: In function register_singleImg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': main.cpp:(.text+0x2a8): undefined reference tocv::imread(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' main.cpp:(.text+0x39a): undefined reference to cv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x3bb): undefined reference tocv::imshow(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&)' main.cpp:(.text+0x43c): undefined reference to cv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x45d): undefined reference tocv::imshow(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&)' CMakeFiles/main.dir/main.cpp.o: In function register_batchImg_directly(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': main.cpp:(.text+0xa4e): undefined reference tocv::glob(std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >&, bool)' main.cpp:(.text+0xad4): undefined reference to `cv::imread(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' CMakeFiles/main.dir/main.cpp.o: In function `recognize_singleImg(std::cxx11::basic_string<char, std::char_traits, std::allocator >)': main.cpp:(.text+0x11e3): undefined reference to cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' main.cpp:(.text+0x13cc): undefined reference tocv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x13f8): undefined reference to cv::imshow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)' main.cpp:(.text+0x1711): undefined reference tocv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x1732): undefined reference to cv::imshow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)' CMakeFiles/main.dir/main.cpp.o: In functionrecognize_batchImg(std::cxx11::basic_string<char, std::char_traits, std::allocator >)': main.cpp:(.text+0x1ed8): undefined reference to `cv::glob(std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >&, bool)' main.cpp:(.text+0x1fc7): undefined reference to cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' main.cpp:(.text+0x232d): undefined reference tocv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x2364): undefined reference to cv::imshow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)' main.cpp:(.text+0x2bf9): undefined reference tocv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x2c2f): undefined reference to cv::imshow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)' CMakeFiles/main.dir/main.cpp.o: In functionregister_batchImg(std::cxx11::basic_string<char, std::char_traits, std::allocator >)': main.cpp:(.text+0x390a): undefined reference to `cv::glob(std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >&, bool)' main.cpp:(.text+0x3fd1): undefined reference to cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' main.cpp:(.text+0x41c8): undefined reference tocv::_OutputArray::_OutputArray(cv::Mat&)' main.cpp:(.text+0x41de): undefined reference to cv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x4211): undefined reference tocv::imshow(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&)' main.cpp:(.text+0x4584): undefined reference to cv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x45b7): undefined reference tocv::imshow(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&)' main.cpp:(.text+0x46c3): undefined reference to cv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x46f6): undefined reference tocv::imshow(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&)' CMakeFiles/main.dir/main.cpp.o: In function register_video(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': main.cpp:(.text+0x5b2f): undefined reference tocv::VideoCapture::read(cv::Mat&)' main.cpp:(.text+0x5d93): undefined reference to cv::_OutputArray::_OutputArray(cv::Mat&)' main.cpp:(.text+0x5da9): undefined reference tocv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x64fb): undefined reference to cv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x651c): undefined reference tocv::imshow(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&)' main.cpp:(.text+0x669f): undefined reference to cv::putText(cv::Mat&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' main.cpp:(.text+0x672d): undefined reference tocv::putText(cv::Mat&, std::cxx11::basic_string<char, std::chartraits, std::allocator > const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' main.cpp:(.text+0x681f): undefined reference to `cv::putText(cv::Mat&, std::cxx11::basic_string<char, std::chartraits, std::allocator > const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' main.cpp:(.text+0x68ac): undefined reference to cv::putText(cv::Mat&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' main.cpp:(.text+0x6a1e): undefined reference tocv::putText(cv::Mat&, std::cxx11::basic_string<char, std::chartraits, std::allocator > const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' CMakeFiles/main.dir/main.cpp.o:main.cpp:(.text+0x6aac): more undefined references to `cv::putText(cv::Mat&, std::cxx11::basic_string<char, std::chartraits, std::allocator > const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' follow CMakeFiles/main.dir/main.cpp.o: In function `register_video(std::cxx11::basic_string<char, std::char_traits, std::allocator >)': main.cpp:(.text+0x6f0b): undefined reference to cv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x6f2c): undefined reference tocv::imshow(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&)' CMakeFiles/main.dir/main.cpp.o: In function `recognize_video(std::cxx11::basic_string<char, std::char_traits, std::allocator >)': main.cpp:(.text+0x8673): undefined reference to cv::_OutputArray::_OutputArray(cv::Mat&)' main.cpp:(.text+0x8689): undefined reference tocv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x8ddb): undefined reference to cv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x8dfc): undefined reference tocv::imshow(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&)' main.cpp:(.text+0x8f7f): undefined reference to cv::putText(cv::Mat&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' main.cpp:(.text+0x900d): undefined reference tocv::putText(cv::Mat&, std::cxx11::basic_string<char, std::chartraits, std::allocator > const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' main.cpp:(.text+0x90ff): undefined reference to `cv::putText(cv::Mat&, std::cxx11::basic_string<char, std::chartraits, std::allocator > const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' main.cpp:(.text+0x918c): undefined reference to cv::putText(cv::Mat&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' main.cpp:(.text+0x92fe): undefined reference tocv::putText(cv::Mat&, std::cxx11::basic_string<char, std::chartraits, std::allocator > const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' CMakeFiles/main.dir/main.cpp.o:main.cpp:(.text+0x938c): more undefined references to `cv::putText(cv::Mat&, std::cxx11::basic_string<char, std::chartraits, std::allocator > const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' follow CMakeFiles/main.dir/main.cpp.o: In function `recognize_video(std::cxx11::basic_string<char, std::char_traits, std::allocator >)': main.cpp:(.text+0x97eb): undefined reference to cv::_InputArray::_InputArray(cv::Mat const&)' main.cpp:(.text+0x980c): undefined reference tocv::imshow(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&)' collect2: error: ld returned 1 exit status CMakeFiles/main.dir/build.make:109: recipe for target 'main' failed make[2]: [main] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/main.dir/all' failed make[1]: [CMakeFiles/main.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

dkurt commented 4 years ago

You need to perform make install step.