User forums > Help

Problem with opencv library (fatal error : No such file or directory)

<< < (4/5) > >>

Zekk:
scarphin :

Yes I perform all the steps listed in the website (so I made modifcations in 'settings ->compiler ->search directories' and 'settings ->compiler ->Linker settings'.

I tried to do the same thing in  'project->build options-> search directories' and  'project->build options->Linker settings', but it's still not working.

In 'settings ->compiler ->search directories ->compiler' I have :


--- Code: ---C:\opencv\include
--- End code ---

And in 'settings ->compiler ->search directories ->Linker' :


--- Code: ---C:\opencv\build\x86\mingw\lib
--- End code ---



stahta01 :

I don't understand why, I configured my computer to compile with :


--- Code: ---c:/program files (x86)/codeblocks/mingw/bin/
--- End code ---

scarphin:
You said you added 'C:\opencv\build\include' but now you say you have 'C:\opencv\include'! Which one is correct?

Do you have a 'C:\opencv\build\include\opencv2\imgproc\imgproc.hpp' file or a 'C:\opencv\build\include\opencv2\imgproc\imgproc.hpp' file? Be careful with the paths!

Also set your paths in the project settings not global compiler settings. Global compiler settings are for every project where project options are just for the current project.

ollydbg:
@Zekk
The official OpenCV release binaries (including 32 bit mingw libs) was build from Official MinGW GCC 4.6.1. So, even you fix the header file issue(I don't think it is hard to fix this issue :)), you will still meet another issue: libraries version mismatch. You should use the same GCC compiler to build your apps, in this case, you should install an Official MinGW GCC 4.6.1. (See which mingw compiler is used to create the pre-build libs in 2.4.3 release for OpenCV devs answers)

The other alternative is: build OpenCV library under TDM GCC 4.7.1 and build your OpenCV app with TDM GCC 4.7.1.

Zekk:
scarphin :

In the website, they said  : add 'C:\opencv\include'. I tried to change with 'C:\opencv\build\include' but nothing change.

So now, I have 'C:\opencv\include'.


ollydbg :

I installed the Official MinGW GCC 4.6.1 (with your link). I generate my opencv library in my project file, but the problem still remain.

scarphin:

--- Quote from: Zekk on June 30, 2013, 08:10:20 am ---scarphin :

In the website, they said  : add 'C:\opencv\include'. I tried to change with 'C:\opencv\build\include' but nothing change.

So now, I have 'C:\opencv\include'.

--- End quote ---

You must be joking! Do you really think that the compiler will find a nonexistent file just because it is written on some tutorial?!?

Ok, last advice. Make sure your opencv path, 'C:\opencv\include' or 'C:\opencv\build\include'. Add the CORRECT PATH (THE ONE ON YOUR COMPUTER NOT THE TUTORIAL) to 'project->build options->search directories->compiler' for TOP LEVEL. And then include your 'imgproc.hpp' file with

--- Code: ---#include <opencv2/imgproc/imgproc.hpp>
--- End code ---

If you still get the same error then you are missing some steps. Loop through them again.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version