Open lihk11 opened 4 years ago
find_package( OpenCV REQUIRED )
What package version is used? Is OpenCV_DIR
specified properly?
Easy way to check this via compiler options paths (make VERBOSE=1
or ninja -v
)
Or dump cv::getBuildInformation()
from your .cpp file.
Thanks for your reply! I'm using 4.1.2, just cloned from master branch.
I tried make VERBOSE=1
. Here are the outputs, I can't see anything wrong..., Could you check it for me?
→ make VERBOSE=1 /usr/bin/cmake -S/home/lihk11/Desktop -B/home/lihk11/Desktop/build --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /home/lihk11/Desktop/build/CMakeFiles /home/lihk11/Desktop/build/CMakeFiles/progress.marks make -f CMakeFiles/Makefile2 all make[1]: Entering directory '/home/lihk11/Desktop/build' make -f CMakeFiles/test.dir/build.make CMakeFiles/test.dir/depend make[2]: Entering directory '/home/lihk11/Desktop/build' cd /home/lihk11/Desktop/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/lihk11/Desktop /home/lihk11/Desktop /home/lihk11/Desktop/build /home/lihk11/Desktop/build /home/lihk11/Desktop/build/CMakeFiles/test.dir/DependInfo.cmake --color= make[2]: Leaving directory '/home/lihk11/Desktop/build' make -f CMakeFiles/test.dir/build.make CMakeFiles/test.dir/build make[2]: Entering directory '/home/lihk11/Desktop/build' [ 50%] Building CXX object CMakeFiles/test.dir/test.cpp.o /usr/bin/c++ -isystem /home/lihk11/opencv/include/opencv4 -o CMakeFiles/test.dir/test.cpp.o -c /home/lihk11/Desktop/test.cpp [100%] Linking CXX executable test /usr/bin/cmake -E cmake_link_script CMakeFiles/test.dir/link.txt --verbose=1 /usr/bin/c++ -lcblas -rdynamic CMakeFiles/test.dir/test.cpp.o -o test -Wl,-rpath,/home/lihk11/opencv/lib /home/lihk11/opencv/lib/libopencv_gapi.so.4.1.2 /home/lihk11/opencv/lib/libopencv_stitching.so.4.1.2 /home/lihk11/opencv/lib/libopencv_aruco.so.4.1.2 /home/lihk11/opencv/lib/libopencv_bgsegm.so.4.1.2 /home/lihk11/opencv/lib/libopencv_bioinspired.so.4.1.2 /home/lihk11/opencv/lib/libopencv_ccalib.so.4.1.2 /home/lihk11/opencv/lib/libopencv_dnn_objdetect.so.4.1.2 /home/lihk11/opencv/lib/libopencv_dpm.so.4.1.2 /home/lihk11/opencv/lib/libopencv_face.so.4.1.2 /home/lihk11/opencv/lib/libopencv_freetype.so.4.1.2 /home/lihk11/opencv/lib/libopencv_fuzzy.so.4.1.2 /home/lihk11/opencv/lib/libopencv_hdf.so.4.1.2 /home/lihk11/opencv/lib/libopencv_hfs.so.4.1.2 /home/lihk11/opencv/lib/libopencv_img_hash.so.4.1.2 /home/lihk11/opencv/lib/libopencv_line_descriptor.so.4.1.2 /home/lihk11/opencv/lib/libopencv_quality.so.4.1.2 /home/lihk11/opencv/lib/libopencv_reg.so.4.1.2 /home/lihk11/opencv/lib/libopencv_rgbd.so.4.1.2 /home/lihk11/opencv/lib/libopencv_saliency.so.4.1.2 /home/lihk11/opencv/lib/libopencv_sfm.so.4.1.2 /home/lihk11/opencv/lib/libopencv_stereo.so.4.1.2 /home/lihk11/opencv/lib/libopencv_structured_light.so.4.1.2 /home/lihk11/opencv/lib/libopencv_superres.so.4.1.2 /home/lihk11/opencv/lib/libopencv_surface_matching.so.4.1.2 /home/lihk11/opencv/lib/libopencv_tracking.so.4.1.2 /home/lihk11/opencv/lib/libopencv_videostab.so.4.1.2 /home/lihk11/opencv/lib/libopencv_viz.so.4.1.2 /home/lihk11/opencv/lib/libopencv_xfeatures2d.so.4.1.2 /home/lihk11/opencv/lib/libopencv_xobjdetect.so.4.1.2 /home/lihk11/opencv/lib/libopencv_xphoto.so.4.1.2 /home/lihk11/opencv/lib/libopencv_highgui.so.4.1.2 /home/lihk11/opencv/lib/libopencv_shape.so.4.1.2 /home/lihk11/opencv/lib/libopencv_datasets.so.4.1.2 /home/lihk11/opencv/lib/libopencv_plot.so.4.1.2 /home/lihk11/opencv/lib/libopencv_text.so.4.1.2 /home/lihk11/opencv/lib/libopencv_dnn.so.4.1.2 /home/lihk11/opencv/lib/libopencv_ml.so.4.1.2 /home/lihk11/opencv/lib/libopencv_phase_unwrapping.so.4.1.2 /home/lihk11/opencv/lib/libopencv_optflow.so.4.1.2 /home/lihk11/opencv/lib/libopencv_ximgproc.so.4.1.2 /home/lihk11/opencv/lib/libopencv_video.so.4.1.2 /home/lihk11/opencv/lib/libopencv_videoio.so.4.1.2 /home/lihk11/opencv/lib/libopencv_imgcodecs.so.4.1.2 /home/lihk11/opencv/lib/libopencv_objdetect.so.4.1.2 /home/lihk11/opencv/lib/libopencv_calib3d.so.4.1.2 /home/lihk11/opencv/lib/libopencv_features2d.so.4.1.2 /home/lihk11/opencv/lib/libopencv_flann.so.4.1.2 /home/lihk11/opencv/lib/libopencv_photo.so.4.1.2 /home/lihk11/opencv/lib/libopencv_imgproc.so.4.1.2 /home/lihk11/opencv/lib/libopencv_core.so.4.1.2 make[2]: Leaving directory '/home/lihk11/Desktop/build' [100%] Built target test make[1]: Leaving directory '/home/lihk11/Desktop/build' /usr/bin/cmake -E cmake_progress_start /home/lihk11/Desktop/build/CMakeFiles 0
System information (version)
Detailed description
When I compile "ppf_load_match.cpp" along with the whole OpenCV project, the result just goes well. But when I try to use the same sample code in a standalone cmake project, it gives a wrong one, like the following output. It seems that every element equals to 0 ...
My CMakeLists.txt:
The same configuration works well on Ubuntu 16.04.