-   Linux - Software (
-   -   Facing problem while running a Opencv program (

dibyamohanty02 12-12-2012 04:37 AM

Facing problem while running a Opencv program
While trying to run the program eigenface.c (http:// using OpenCv getting the following error :

eigenface.c:26:19: fatal error: cvaux.h: No such file or directory
compilation terminated.

How to resolve this?

knudfl 12-13-2012 05:36 AM

/usr/include/opencv/cvaux.h : You can use pkgconfig to add the path.
Like :
gcc -Wall -g eigenface.c -o eigenface `pkg-config --cflags opencv`

Or add a CFLAG : CFLAGS=-I/usr/include/opencv/


( The package 'opencv-devel' or 'libopencv-dev' is required.)


dibyamohanty02 12-14-2012 03:38 AM

Still facing the same problem.. :(

knudfl 12-14-2012 04:12 AM

# 3

Still facing the same problem..
The same problem = "Not finding cvaux.h" !

Did you install *opencv-dev* ? ?

Which OS are you using ?

A valid link to ""

eigenface.c : It's c++ code : g++ must be used, not gcc → →
g++ eigenface.c -o eigenface `pkg-config --cflags opencv`
Or better for that old code :
g++41 eigenface.c -o eigenface `pkg-config --cflags opencv`
There a minor bug in the "eigenface.c cpp" file.
The headers cv.h, cvaux.h are found OK.

Works too : g++ eigenface.c -o eigenface -I/usr/include/opencv/
( Except for the bug.)


All times are GMT -5. The time now is 08:26 AM.