开发者

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

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 advanc开发者_如何学运维e


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.


The cxcore.h does not seem to be removed from the API. So run

pkg-config --cflags-only-I opencv

and check to see if the directory that contains cxcore.h (very likely to be /usr/include/opencv or /usr/local/include/opencv) is added to the include path. If it is not then you can add it manually with to the makefile recipe or edit the opencv.pc file to look something like this

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/opencv

Name: OpenCV
Description: Intel(R) Open Source Computer Vision Library
Version: 2.1.0
Libs: -L${libdir} -lml -lcvaux -lhighgui -lcv  -lcxcore
Cflags: -I${includedir}

You may need to edit the prefix to match your installation prefix


I have this working in Ubuntu Precise. I had to install the following packages, as well as make the change to gtk+-2.0 previous mentioned.

gtk+-2.0 libgtk2.0-dev libcv-dev libhighgui-dev doxygen

Some background information can be found here regarding usage - https://web.engr.oregonstate.edu/~hess/publications/siftlib-acmmm10.pdf

Both bin/match and bin/siftfeat are working for me and produce images with arrows on them showing where the features have been extracted

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜