简体   繁体   English

无法在eclipse中找到Opencv库文件

[英]Opencv library files cannot find in eclipse

I am trying to develop a simple c++ project which uses opencv.I followed http://docs.opencv.org/doc/tutorials/introduction/linux_eclipse/linux_eclipse.html website. 我正在尝试开发一个使用opencv的简单c ++项目。我遵循了http://docs.opencv.org/doc/tutorials/introduction/linux_eclipse/linux_eclipse.html网站。 But eclipse shows errors like 但是日食显示错误

/usr/bin/ld: cannot find -llibopencv_photo
/usr/bin/ld: cannot find -llibopencv_stitching
/usr/bin/ld: cannot find -llibopencv_superres
/usr/bin/ld: cannot find -llibopencv_ts
/usr/bin/ld: cannot find -llibopencv_video
/usr/bin/ld: cannot find -llibopencv_videostab
/usr/bin/ld: cannot find -llibopencv_calib3d
/usr/bin/ld: cannot find -llibopencv_contrib
/usr/bin/ld: cannot find -llibopencv_ocl
/usr/bin/ld: cannot find -llibopencv_core
/usr/bin/ld: cannot find -llibopencv_core
/usr/bin/ld: cannot find -llibopencv_flann
/usr/bin/ld: cannot find -llibopencv_gpu
/usr/bin/ld: cannot find -llibopencv_highgui
/usr/bin/ld: cannot find -llibopencv_imgproc
/usr/bin/ld: cannot find -llibopencv_legacy
/usr/bin/ld: cannot find -llibopencv_ml
/usr/bin/ld: cannot find -llibopencv_nonfree
/usr/bin/ld: cannot find -llibopencv_objdetect
collect2: ld returned 1 exit status
make: *** [MyProject] Error 1`

I have included libraries and their paths in the following ways. 我通过以下方式包括了库及其路径。

Project–>Properties 项目 - >属性

In C/C++ Build ->Settings. 在C / C ++ Build-> Settings中。

In GCC C++ Compiler ->Includes. 
In Include paths(-l) I have added /usr/local/include/opencv.

In GCC C++ Linker 
I have added the path (-L) as /usr/local/lib and also library names.

Can anyone please tell me what the reason for this errors? 谁能告诉我这个错误的原因是什么?

您必须添加不带前缀“ lib”的库名称

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM