Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Package gtk-engines-2 was not found in the pkg-config search path

Tags:

c

makefile

opencv

I am trying to compile Rob Hess's C implementation of SIFT algorithm. I installed OpenCV 2.1 successfully and tested the installation with sample C programs provided. There was no error.

This code I am trying to compile was written using OpenCV 2.0. I successfully compiled and ran the exact code sometime back with OCV2.0 . But now compilation fails and prints this. I am using the make file provided with the code.

make -C ./src siftfeat
make[1]: Entering directory `/home/niroshan/sift/src'
ar rc ../lib/libfeat.a imgfeatures.o utils.o sift.o kdtree.o minpq.o xform.o refine.o
ranlib  ../lib/libfeat.a
gcc  -I../include `pkg-config --cflags opencv gtk-engines-2` siftfeat.c -o ../bin/siftfeat -L../lib -lfeat `pkg-config --libs opencv gtk-engines-2`
Package gtk-engines-2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk-engines-2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk-engines-2' found
Package gtk-engines-2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk-engines-2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk-engines-2' found
In file included from siftfeat.c:18:
sift.h:23: fatal error: cxcore.h: No such file or directory
compilation terminated.
make[1]: *** [siftfeat] Error 1
make[1]: Leaving directory `/home/niroshan/sift/src'
make: *** [siftfeat] Error 2

Probably there is another problem with including cxcore.h Could someone explain me whats wrong here? Thank you in advance

like image 937
Niroshan Avatar asked Feb 25 '23 16:02

Niroshan


1 Answers

Had the same problem on my Ubuntu 10.10 box.

I found what file was needed by the build ("gdk/gdk.h") and saw that the gtk+-2.0 package (/usr/lib/pkgconfig/gtk+-2.0.pc) provided the include path to /usr/include/gtk-2.0, which the needed file exists relative to.

I edited src/Makefile and changed both CFLAGS and LIBS pkg-config lines from "pkg-config ... opencv gtk-engines-2" to "pkg-config ... opencv gtk+-2.0" and it built for me.

like image 77
Nate Avatar answered May 02 '23 02:05

Nate