linux 下 opencv程序怎么编译

 我来答
卜渺S5
2017-08-29 · TA获得超过800个赞
知道小有建树答主
回答量:1062
采纳率:10%
帮助的人:480万
展开全部
运行了楼上给的命令之后,结果是这样的:
# g++ `pkg-config opencv --libs --cflags opencv` facedect.cpp -o facedect -static
/tmp/cc8XhRf6.o: In function `find_face(_IplImage*)':
facedect.cpp:(.text+0x51): undefined reference to `cvCreateImage'
facedect.cpp:(.text+0xc0): undefined reference to `cvCreateImage'
facedect.cpp:(.text+0xdd): undefined reference to `cvCvtColor'
facedect.cpp:(.text+0xf7): undefined reference to `cvResize'
facedect.cpp:(.text+0x109): undefined reference to `cvEqualizeHist'
facedect.cpp:(.text+0x116): undefined reference to `cvClearMemStorage'
facedect.cpp:(.text+0x188): undefined reference to `cvHaarDetectObjects'
facedect.cpp:(.text+0x1c6): undefined reference to `cvReleaseImage'
facedect.cpp:(.text+0x1d1): undefined reference to `cvReleaseImage'
/tmp/cc8XhRf6.o: In function `isperson(char const*)':
facedect.cpp:(.text+0x21e): undefined reference to `cvLoad'
facedect.cpp:(.text+0x22f): undefined reference to `cvCreateMemStorage'
facedect.cpp:(.text+0x25a): undefined reference to `cvLoadImage'
facedect.cpp:(.text+0x27d): undefined reference to `cvReleaseImage'
facedect.cpp:(.text+0x289): undefined reference to `cvDestroyWindow'
collect2: ld returned 1 exit status
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式