码迷,mamicode.com
首页 > 其他好文 > 详细

pkg-config

时间:2018-01-08 01:08:50      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:fft   inf   top   gpo   ref   oca   ack   exe   name   

wiki

pkg-config.org

其它参考链接

事情是这样子的

编译opencv下的sample/cpp文件夹下的stitching.cpp文件

g++ `pkg-config --cflags --libs opencv` --std=c++11 stitching.cpp

提示未定义的引用

g++ -std=c++11 stitching.cpp -L /usr/local/lib/*.so

改用上述编译命令成功编译

/usr/local/lib/pckconfig/opencv.hc内容如下

# Package Information for pkg-config

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir_old=${prefix}/include/opencv
includedir_new=${prefix}/include

Name: OpenCV
Description: Open Source Computer Vision Library
Version: 3.3.0
Libs: -L${exec_prefix}/lib -lopencv_cudabgsegm -lopencv_cudaobjdetect -lopencv_cudastereo -lopencv_dnn -lopencv_ml -lopencv_shape -lopencv_stitching -lopencv_cudafeatures2d -lopencv_superres -lopencv_cudacodec -lopencv_videostab -lopencv_cudaoptflow -lopencv_cudalegacy -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_photo -lopencv_imgcodecs -lopencv_cudawarping -lopencv_cudaimgproc -lopencv_cudafilters -lopencv_video -lopencv_objdetect -lopencv_imgproc -lopencv_flann -lopencv_cudaarithm -lopencv_core -lopencv_cudev
Libs.private: -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lgthread-2.0 -L/usr/lib/x86_64-linux-gnu -lpng -lz -ltiff -ljasper -ljpeg -ldc1394 -lavcodec-ffmpeg -lavformat-ffmpeg -lavutil-ffmpeg -lswscale-ffmpeg -ldl -lm -lpthread -lrt -lcudart -lnppc -lnppi -lnpps -lcufft -L-L/usr/local/cuda-8.0 -l64
Cflags: -I${includedir_old} -I${includedir_new}

原因应该是opencv.hc链接库没写全

pkg-config

标签:fft   inf   top   gpo   ref   oca   ack   exe   name   

原文地址:https://www.cnblogs.com/dirge/p/8232747.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!