News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

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

Started by Zekk, June 28, 2013, 07:48:32 AM

Previous topic - Next topic

Zekk

Hello everyone,

I want to use opencv library (v.2.4.5) with C::B (v.12.11) I have followed the instruction bellow (http://opencv.willowgarage.com/wiki/CodeBlocks), and I also set the PATH variable environnement on this adress : C:\opencv\bluid\x86\mingw\bin (my opencv library was extract in C:\).

But when I try to test a sample program like  "demhist" in the folder "C:\OpenCV\samples\cpp\demhist.cpp", I have the following message : fatal error : imgproc.hpp : No such file or directory

I'm looking for a solution since yesterday but I can't find anything.

Do you have any suggestions ?

BlueHazzard


Zekk

yes, I even try to uninstall/reinstall Code Blocks and restart the steps

BlueHazzard

search for the  improc.hpp  and add the the path to the search directories....

Zekk

They are two files  imgproc.hpp.

The first is in C:\opencv\build\include (I already add this one)
The second is in C:\opencv\module

Even if I add the  adress in Search directories (Compiler), it's still not work

scarphin

How do you include 'improc.hpp'?

<improc.hpp>

or

<opencv2/improc/improc.hpp>

Zekk

I include 'imgproc.hpp' with :

<imgproc.hpp>

I already try with

<opencv2/imgproc/imgproc.hpp>

but it doesn't work.

BlueHazzard

Did you made a project, or did you loaded only the source file?

try to: Project->Build options->Other Options, add there a -v and rebuild. Then post the FULL BUILD LOG, from the "Build Log" tab here.

greetings

Zekk

Here the message :


-------------- Build: Debug in test_opencv (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -fexceptions  -g -v    -IC:\opencv\include -IC:\opencv\modules -IC:\opencv\build\include  -c C:\Users\Clems\Documents\Programmation\test_opencv\main.cpp -o obj\Debug\main.o
Using built-in specs.
COLLECT_GCC=mingw32-g++.exe
Target: mingw32
Configured with: ../../src/gcc-4.7.1/configure --build=mingw32 --enable-languages=c,c++,ada,fortran,objc,obj-c++ --enable-threads=win32 --enable-libgomp --enable-lto --enable-fully-dynamic-string --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gnu-ld --disable-nls --disable-win32-registry --disable-symvers --disable-build-poststage1-with-cxx --disable-werror --prefix=/mingw32tdm --with-local-prefix=/mingw32tdm --enable-cxx-flags='-fno-function-sections -fno-data-sections' --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: win32
gcc version 4.7.1 (tdm-1)
COLLECT_GCC_OPTIONS='-Wall' '-fexceptions' '-g' '-v' '-I' 'C:\opencv\include' '-I' 'C:\opencv\modules' '-I' 'C:\opencv\build\include' '-c' '-o' 'obj\Debug\main.o' '-mtune=i386' '-march=i386'
c:/program files (x86)/codeblocks/mingw/bin/../libexec/gcc/mingw32/4.7.1/cc1plus.exe -quiet -v -I C:\opencv\include -I C:\opencv\modules -I C:\opencv\build\include -iprefix c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/ C:\Users\Clems\Documents\Programmation\test_opencv\main.cpp -quiet -dumpbase main.cpp -mtune=i386 -march=i386 -auxbase-strip obj\Debug\main.o -g -Wall -version -fexceptions -o C:\Users\Clems\AppData\Local\Temp\ccIFFwHz.s
GNU C++ (tdm-1) version 4.7.1 (mingw32)
compiled by GNU C version 4.7.1, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/../../../../mingw32/include"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include/c++"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include/c++/mingw32"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include/c++/backward"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/../../../../include"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include-fixed"
ignoring nonexistent directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/../../../../mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
C:\opencv\include
C:\opencv\modules
C:\opencv\build\include
c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include/c++
c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include/c++/mingw32
c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include/c++/backward
c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include
c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/../../../../include
c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include-fixed
End of search list.
GNU C++ (tdm-1) version 4.7.1 (mingw32)
compiled by GNU C version 4.7.1, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1b05afeca9d712f769248af52f554d5e
C:\Users\Clems\Documents\Programmation\test_opencv\main.cpp:9:23: fatal error: imgproc.hpp: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings (0 minutes, 0 seconds)

BlueHazzard

C:\Users\Clems\Documents\Programmation\test_opencv\main.cpp:9:23: fatal error: imgproc.hpp: No such file or directory

so, is this header called "imgproc.hpp" or "improc.hpp"

check your typo....

Zekk

Ho ok, I'm sorry ... wrong writing. I corrected my previous topics : the right name is "imgproc.hpp"  as you said (but problem remain the same).

Sorry for that.

scarphin

What directories do you have in your 'project->build options-> search directories->compiler' for top level?

Zekk

I have nothing.

When I read your anwser, I try to add in  'project->build options-> search directories'  the same things than in 'settings ->compiler ->search directories', but I still have the same error.

scarphin

Did you actually performed the steps in http://opencv.willowgarage.com/wiki/CodeBlocks? Because if you did you would have your search dirs in 'project->build options-> search directories->compiler'!

And again, what directories do you have in 'settings ->compiler ->search directories' or wherever you have them?

stahta01

Please decide what MinGW GCC you are trying to use!
Then, tell us which one you are trying to use?

You appear to be trying to use two different MinGW GCC in a single project this will NOT work!!!

One of them.

C:\opencv\bluid\x86\mingw\bin


The othe one.

c:/program files (x86)/codeblocks/mingw/bin/


Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]