简体   繁体   English

找不到lopencv_core和其他库变量

[英]cannot find lopencv_core and other library variables

I am using Eclipse Helios with cdt plugin and I have also downloaded MINGW. 我正在使用带有cdt插件的Eclipse Helios,并且还下载了MINGW。 Now I have copy pasted the basic Opencv program which I found here OpenCV on eclipse on windows I have followed all the instructions given in this link, and also search other few links. 现在,我已复制粘贴了基本的Opencv程序,该程序在Windows eclipse上的OpenCV中找到我已经遵循了此链接中给出的所有说明,并且还搜索了其他一些链接。 I have also added the open cv path by going to project properties. 我还通过转到项目属性来添加了开放的简历路径。 But still it is showng that 但仍然表明

c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lopencv_core opencv_imgproc opencv_highgui opencv_ml opencv_video opencv_features2d opencv_calib3d opencv_objdetect opencv_contrib opencv_legacy opencv_flann c:/ mingw / bin /../ lib / gcc / mingw32 / 4.8.1 /../../../../ mingw32 / bin / ld.exe:找不到-lopencv_core opencv_imgproc opencv_highgui opencv_ml opencv_video opencv_features2d opencv_calib3d opencv_obj检测opencv_contrib opencv_legacy opencv_flann

I have checked multiple times and added these variables to library. 我已经检查了多次,并将这些变量添加到库中。 please help. 请帮忙。

Have you compiled opencv by yourself? 您自己编译过opencv吗? I believe that there is no pre-compiled opencv library release for mingw, but precompiled opencv library with visual c++ 10, 11, 12 are available. 我相信mingw没有预编译的opencv库版本,但是可以使用带有可视c ++ 10、11、12的预编译的opencv库。

If you have not compiled opencv, you need to follow the instructions: 如果尚未编译opencv,则需要遵循以下说明:

  1. Go to this link . 转到此链接 This link is useful. 该链接很有用。 Specifically, in your case, you need to visit the link titled Installation in Windows 具体来说,您需要访问标题为Windows中的安装的链接
  2. Carefully watched both videos in the mentioned page above, specifically 1st video and the beginning part of the 2nd video. 仔细观看了上面提到的页面中的两个视频,特别是第一个视频和第二个视频的开始部分。 I know the steps is for visual studio compilation, but it is useful to gain some feelings of the compilation steps. 我知道这些步骤适用于Visual Studio编译,但是对编译步骤有一些了解是很有用的。
  3. Follow this video to do the compilation of opencv on MINGW 跟随此视频在MINGW上编译opencv

Note: Lots of information is out of date in the above videos. 注意:以上视频中很多信息已过时。 You need to modify/adapt the steps mentioned in the videos. 您需要修改/调整视频中提到的步骤。

Note: I know the video in the 3rd step is not in English. 注意:我知道第3步中的视频不是英语。 However, it is the video for the latest version of opencv I can find, for MINGW. 但是,这是我可以找到的MINGW最新版本的opencv的视频。

Tips: make sure you clean up all CMake erorrs before you really generate makefile to compile opencv. 提示:在真正生成makefile来编译opencv之前,请确保清除所有CMake错误。

Note: The compile procedure for opencv on mingw does NOT depend on Qt (I know you are using Eclipse). 注意:mingw上的opencv的编译过程不依赖于Qt(我知道您正在使用Eclipse)。

Please prepare to spend lots of time for this compilation, as it does require you to download many tools for this compilation, such as CMake. 请准备花费大量时间进行此编译,因为它确实需要下载许多用于此编译的工具,例如CMake。

Many steps described in the video can be skipped, if you don't want to use those components. 如果您不想使用这些组件,可以跳过视频中描述的许多步骤。 For example, if you don't want to use python, you don't need to download python. 例如,如果您不想使用python,则无需下载python。

Good luck, and enjoy. 祝你好运,并享受。

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

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