2

I regularly use Code::Blocks and MinGW for my C/C++ projects. I would like to be able to use OpenCV, since it has a nice library for computer vision projects. They have dropped support for MinGW. I have heard you can build it on your own somehow, but I have no experience doing this with 3rd party libraries. Can someone explain how to build it in a simple way for MinGW?

1
  • You can see some instruction here in OpenCV Official site Commented Mar 31, 2014 at 12:24

1 Answer 1

1

There is, or at least there was at least until 2.4.6, precompiled version of opencv that works out of the box with mingw as long as you use the dw2(standard) version of mingw.

since i needed sjlj support i had to build my own version of openCV 2.4.6 I did he following - i am pretty sure it will work for the current openCV version as well

  1. Setup your preferred Mingw Environment - i would strongly recommend to use gcc 4.5 or newer
  2. Intstall Msys
  3. Intall Cmake - you can get a binary package
  4. Start the Cmake GUI
  5. Select the openCV source folder
  6. Click Configure and select MSYS-Makfiles
  7. Errors in the first run of Configure might be resolved if you run Configure again
  8. Click Generate
  9. use MSYS make to run the generated makefile
  10. Copy all desired libraries and include files to your mingw-installation or your project
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.