Ask Your Question

Revision history [back]

How to Use OpenCV 2.48 with CodeBlock on Windows7 , 64 bit

Need help. I have been using codeblock and openCV using IplImage etc. Developed and used many examples but all IplImage manipulation. Now I want to use mat feature. I am unable to configure CodeBlock with openCV , I have downloaded MinGw ( complete size around 1.3 GB ) , Tried various version of CodeBlock, the best working with me is Version CodeBlock 10.05. with Mingw , but I have not used that : no link , no reference in path / libraries

I have tried to use Cmake to make binaries of MinGW but no success, so deleted all data of CMake and what it produced.

My Path includes ( MinGW is placed in E:\MinGW )

E:\MinGW\bin; E:\MinGW\mingw32\bin; C:\opencv248\opencv\build\x86\vc10\bin ; D:\path ;

I have configures CodeBlock as under:-

Using code::blocks-10.04 for OpenCV 2.4.8 , in Windows 7 64 bit.

Open code::blocks go to Setting->Compiler and debugger, then a popup window opens.

I selected Search directories tab, and below select Compiler tab, gave OpenCV include path,

image description

C:\opencv248\opencv\build\include\opencv2
C:\opencv248\opencv\build\include\opencv C:\opencv248\opencv\build\include E:\MinGW\include

Then I Clicked on Linker tab next to Compiler tab added OpenCV bin directory, like image description

C:\opencv248\opencv\build\x86\vc10\bin , here I used 32 bit binaries. e:\MinGW\bin

Now open Linker settings tab and below Link libraries add OpenCV libraries, image description

E:\MinGW\lib\libaclui.a etc there are many files Also added all files like this open : E:\MinGW\mingw32\lib\libwin32spl.a

Toolchain is configures for e:\MinGW as shown image description

I also set the Build Options image description

then

image description

and

image description

next

image description

I get these errors
Linking console executable: bin\Release\brave.exe build Log :

e:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find C:\opencv248\opencv\build\x86\vc10\bin: Permission denied e:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find E:\MinGW\bin: Permission denied e:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find E:\MinGW\mingw32\bin: Permission denied

collect2.exe: error: ld returned 1 exit status

Process terminated with status 1 (0 minutes, 1 seconds)

3 errors, 0 warnings

image description

and image description

Build messages

ld.exe cannot find C:\opencv248\opencv\build\x86\vc10\bin: Permission denied ld.exe cannot find E:\MinGW\bin: Permission denied ld.exe cannot find E:\MinGW\mingw32\bin: Permission denied === Build finished: 3 errors, 0 warnings ===