配置eclipse CDT和openCV [英] Configuring eclipse CDT and openCV

查看:162
本文介绍了配置eclipse CDT和openCV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Windows 7中配置OpenCV和eclipse CDT(Juno)。我已经安装了MinGW,并一直使用eclipse与MinGW写C ++程序。我现在正试图整合OpenCV库。下面是我遵循的步骤:

I am trying to configure OpenCV and eclipse CDT (Juno) in Windows 7. I have already installed MinGW and have been using eclipse with MinGW to write C++ programs. I am now trying to incorporate the OpenCV libraries. Below are the steps I have followed:


  1. 下载OpenCV 2.4.2并解压缩到F:\Applications\opencv

  2. 在c / c ++构建>设置下的项目属性下创建新的eclipse C ++项目

  3. GCC C ++编译器>包含>包含路径(-I) em>F:\Applications\opencv\build\include\

  4. 在MinGW C ++ Linnker>库>库Minecraft>Libraries>库搜索路径(-L)我已添加了F:\Applications \文件夹中的opencv_core242,opencv_imgproc242,opencv_highgui242

  5. opencv \build\x86\lib

  1. Download and extract OpenCV 2.4.2 to F:\Applications\opencv
  2. Create new eclipse C++ project
  3. under project properties under c/c++ build > settings > GCC C++ Compiler > Includes > Include Paths (-I) I have added "F:\Applications\opencv\build\include\"
  4. under MinGW C++ Linnker > Libraries > Libraries (-l) I have added "opencv_core242", "opencv_imgproc242", "opencv_highgui242"
  5. under MinGW C++ Linker > Libraries > Library search path (-L) I have added "F:\Applications\opencv\build\x86\lib"

我尝试写简单的程序: p>

I have then tried to write the simple program:

#include "opencv2\opencv.hpp"
#include <iostream>
using namespace std;
using namespace cv;
int main(void)
{
    Mat A;
    A = imread("lena.png", CV_LOAD_IMAGE_COLOR);

    imshow("image", A);

    cout << "Done" << endl;
    return 0;
}

但没有任何反应,我甚至不会得到完成输出。我现在因为我是新的C + +和OpenCV,并不太确定如何调试这一点和继续前进stumped。

However nothing happens and I don't even get the "Done" message in the output. I am stumped now as I'm new to C++ and OpenCV and am not quite sure how to debug this and move forward.

任何建议是赞赏。

Any suggestions are appreciated.

推荐答案

我发现问题,我不得不添加F:\Applications\opencv\build\x86\\\\bin ;到我的系统路径

I found the problem, I had to add F:\Applications\opencv\build\x86\mingw\bin; to my system path

这篇关于配置eclipse CDT和openCV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆