[英]Eclipse CDT and OpenCV issue
I'm trying to make OpenCV work in Eclipse CDT, provided that I'm using the following under Windows 7
: 我想使OpenCV在Eclipse CDT中工作,前提是我在
Windows 7
下使用以下代码:
I have set the path for Includes
under Cygwin C++ Compiler
as follows: C:\\OpenCV2.2\\include\\opencv
我已经在
Cygwin C++ Compiler
下设置了Includes
的路径,如下所示: C:\\OpenCV2.2\\include\\opencv
And, also set the path for Libraries
under Cygwin Linker
as follows: C:\\OpenCV2.2\\lib
并且,还如下设置
Cygwin Linker
下的Libraries
路径: C:\\OpenCV2.2\\lib
When I try to build the project, I get the following two errors: 当我尝试构建项目时,出现以下两个错误:
cannot find -lC:/OpenCV2.2/lib
make: *** [OpenCVDemo.exe] Error 1
Any ideas why am I getting that? 有什么想法我为什么要得到吗?
Thanks. 谢谢。
You need to add C:\\OpenCV2.2\\lib
as a library path , not a library. 您需要添加
C:\\OpenCV2.2\\lib
作为库路径 ,而不是库路径 。 Add libraries that you will use: 添加将要使用的库:
opencv_core
opencv_highgui
etc. 等等
Also you may need to use include directory C:\\OpenCV2.2\\include\\opencv2
and #include <opencv.hpp>
. 另外,您可能需要使用包含目录
C:\\OpenCV2.2\\include\\opencv2
和#include <opencv.hpp>
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.