Using OpenCV with codeblocks in Windows

Asked By 230 points N/A Posted on -
qa-featured

Hi there,

I recently got my hands on image processing. I am using opencv. It is interesting, but the problem is I am used to coding with codeblocks IDE.

It is a free IDE. But the openCV installer I downloaded, OpenCV-2.1.0-win32-vs2008; seems to be for working with Visual Studio 2008 only. Is there any way I can use it with codeblocks and mingw?

SHARE
Best Answer by Britney Camden
Answered By 0 points N/A #101311

Using OpenCV with codeblocks in Windows

qa-featured

Yes, you can. The installer just helps to configure the compiler path directory, when used with Visual Studio.

When installed, it can also be used with other IDEs too.

You just need to configure them manually.

Answered By 230 points N/A #101312

Using OpenCV with codeblocks in Windows

qa-featured

How do I configure them anyway?

Is there any configure script?

Best Answer
Best Answer
Answered By 0 points N/A #101313

Using OpenCV with codeblocks in Windows

qa-featured

Open your code blocks IDE. Go to settings -> Compiler and Debugger.

In the “Linker settings” tab add the libraries “*.lib”

Linker Settings

Next to the search directories tab. Compiler sub tab. Add the “include” folder. On the Linker subtab (also under search directories). Add the “lib” folder.

Answered By 230 points N/A #101314

Using OpenCV with codeblocks in Windows

qa-featured

I have done as you said. But it still says, "cv.h no such file or directory."

Answered By 0 points N/A #101315

Using OpenCV with codeblocks in Windows

qa-featured

Please browse to the installation directory > go to include folder and tell me what's in it?

Answered By 230 points N/A #101316

Using OpenCV with codeblocks in Windows

qa-featured

There is another folder named “opencv” and there are some headers in it.

I think I got it.

Answered By 0 points N/A #101317

Using OpenCV with codeblocks in Windows

qa-featured

Just use:

#include <opencvcv.h>

Instead of

#include <cv.h>

This should solve the problem.

Answered By 230 points N/A #101318

Using OpenCV with codeblocks in Windows

qa-featured

Thanks very much.

Login/Register to Answer

Related Questions