Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here is the step I followed to set code::blocks-10.04 global compiler setting for OpenCV, in Windows 7 64 bit.

  1. Open code::blocks go to Setting->Compiler and debugger, a popup window will open.

  2. Now select Search directories tab, and below select Compiler tab, now OpenCV include path, generally C:\opencv_path\build\include

  3. Click on Linker tab next to Compiler tab add OpenCV bin directory, like C:\opencv_path\build\x86\mingw\bin, here I used 32 bit binaries.

  4. Now open Linker settings tab and below Link libraries add OpenCV libraries, C:\opencv_path\build\x86\mingw\bin

Note that the above steps are global compiler setting for code:blocks and if you want to configure for a single project, just right click on the project name, select Build option and follow above steps.

And if you are using pre-built libraries there might be some issue with mingw, for me pre-built libraries works fine with Windows7 64-bit (32-bit binaries) but not on Windows 7 32-bit.

Any way just follow above and see it's working, if no you may have to build your own libraries for mingw from source.