LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Facing problem while running a Opencv program (https://www.linuxquestions.org/questions/linux-software-2/facing-problem-while-running-a-opencv-program-4175441102/)

dibyamohanty02 12-12-2012 04:37 AM

Facing problem while running a Opencv program
 
While trying to run the program eigenface.c (http://http://www.cognotics.com/open.../part5-src.zip) 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/

etc.

( 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
Quote:

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

Did you install *opencv-dev* ? ?

Which OS are you using ? http://linuxsilo.net/docs/smart-questions_en.html
http://www.linuxquestions.org/linux/...Ask_a_Question

A valid link to "part5-src.zip"
http://www.cognotics.com/opencv/serv.../part5-src.zip
http://www.cognotics.com/opencv/servo_2007_series/

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 12:31 AM.