Eclipse CDT 无法与集成了 Cygwin 编译器的 OpenCV 2.0 一起使用
我已经完成了所有必要的工作,例如将“c:/cygwin/bin”添加到系统路径,我还在项目->属性->c/c++ build->下设置了 include 路径;设置并设置链接库搜索路径。
现在,当我包含像#include“cv.h”这样的文件时,它不会给出错误,但是当我运行程序时,错误会出现,例如对“_cvGetSize”的未定义引用
我已经包含了必要的文件,并阅读了很多可用的教程,但我仍然无法运行我的代码,请帮助我
I have done all the necessary job like adding "c:/cygwin/bin" to system path, I have also set the include path under project->properties->c/c++ build->setting and also set the linker library search path.
Now when I include file like #include"cv.h", it gives no error, but when I run the program error comes like
undefined reference to '_cvGetSize'
I have included the necessary files, and read lots of tutorials that are available but still I couldn't able to run my code, please help me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我总是建议在跳转到 IDE 之前,通过尝试在 cmd 行上编译应用程序来确保您的系统已正确安装和配置:
或者:
显然您没有将您的项目与 opencv 库链接,这是正在实现的在上面的 cmd 中使用:
-lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objDetect -lopencv_contrib -lopencv_legacy -lopencv_flann
。该缺失的符号是在这些库之一中定义的。
I always recommend that before jumping to an IDE you make sure your system is installed and configured correctly by attempting to compile an application on the cmd-line:
or:
Apparently you didn't link your project with the opencv libraries, which is being achieved in the cmd above with:
-lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
.That missing symbol is defined in one of these libraries.