1

Since last month I was working with OpenCV2.2(pre-built) using c functions only in code::blocks. But I need to shift to c++ API. But when I run the c++ code I am getting error like "undefined reference to c++ function". I just search in internet and found that I need to build from source. So I just moved to OpenCV2.4.3. These are my setting what I do with OpenCV2.4.3 for configuring project in code::blocks.

  1. Extract OpenCV2.4.3 to E:\opencv
  2. Add the line "E:\opencv\build\x86\mingw\bin" to path.
  3. And in code::blocks set up the project like -> Compiler and debugger setting->search directories add "E:\opencv\build\include" -> In linker tab add "E:\opencv\build\x86\mingw\bin" -> In limker setting tab add "E:\opencv\build\x86\mingw\lib"

And I build my project successfully but while I am running my project I am getting the error like "Program Can't start because libgcc_s_dw2-1.dll missing from your computer". I am using code::blocks with MingGW compiler.

My questions are
1. Why I can't run c++ code using OpenCV2.2 while c code is successfully build and ran. Is it the pre-built library problem. If so where can I download OpenCV pre-built library which support both c and c++ code. 2. Why the MingGW compiler showing the error like "libgcc_s_dw2-1.dll missing "for OpenCV2.4.3 where as OpenCV2.2 successfully build and ran using the same MingGW compiler.

Any help will appreciated.

Thanks in advance..........

4

1 回答 1

1

当我从 OpenCV 2.0 切换到 OpenCV 2.4.3 时,我遇到了同样的问题。所以我会提出以下建议。

  1. 卸载 CodeBlocks 和 Opencv 2.4.3

  2. 使用您之前遵循的相同步骤重新安装并集成它们。

让我们知道这是否有效。

于 2013-03-05T15:53:10.443 回答