pkg-config

pkg-config 简单来说就是向用户向程序提供相应库的路径、版本号等信息的程序。

$ pkg-config --libs --cflags opencv
$ pkg-config --libs --cflags gstreamer-1.0

$pkg-config --modversion opencv

会显示以下信息

-I/usr/include/opencv -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_datasets -lopencv_dpm -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hdf -lopencv_line_descriptor -lopencv_optflow -lopencv_video -lopencv_plot -lopencv_reg -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_rgbd -lopencv_viz -lopencv_surface_matching -lopencv_text -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_xobjdetect -lopencv_objdetect -lopencv_ml -lopencv_xphoto -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_photo -lopencv_imgproc -lopencv_core
-I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0
 3.3.1

是从包名为 xxx.pc 这个文件中找到的,比如以上的两条命令,他就是从opencv.pcgstreamer-1.0.pc中找到的

 

.pc文件 是对其的库文件路径,头文件路径,版本号等一些参数进行封装。

posted @ 2020-05-17 15:36  yang_xs  阅读(178)  评论(0编辑  收藏  举报