在 pkg-config 搜索路径中找不到软件包 gtk-engines-2

发布于 2024-10-27 12:25:39 字数 1251 浏览 1 评论 0原文

我正在尝试编译 Rob Hess 的 SIFT 算法的 C 实现。 我成功安装了 OpenCV 2.1,并使用提供的示例 C 程序测试了安装。没有错误。

我尝试编译的这段代码是使用 OpenCV 2.0 编写的。我成功编译并运行了 OCV2.0 的确切代码。但现在编译失败并打印此内容。我正在使用代码中提供的 make 文件。

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

包含 cxcore.h 可能还有另一个问题 有人可以解释一下这里出了什么问题吗? 先感谢您

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

浊酒尽余欢 2024-11-03 12:25:39

我的 Ubuntu 10.10 机器上也有同样的问题。

我找到了构建所需的文件(“gdk/gdk.h”),并看到 gtk+-2.0 软件包(/usr/lib/pkgconfig/gtk+-2.0.pc)提供了 /usr/include/ 的包含路径gtk-2.0,所需文件相对于该文件存在。

我编辑了 src/Makefile 并将 CFLAGS 和 LIBS pkg-config 行从“pkg-config ... opencv gtk-engines-2”更改为“pkg-config ... opencv gtk+-2.0”,它是为我构建的。

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.

謌踐踏愛綪 2024-11-03 12:25:39

cxcore.h 似乎没有从 API 中删除。
因此,运行

pkg-config --cflags-only-I opencv

并检查包含 cxcore.h 的目录(很可能是 /usr/include/opencv 或 /usr/local/include/opencv)是否已添加到包含路径中。如果不是,那么您可以手动将其添加到 makefile 配方中或编辑 opencv.pc 文件以使其看起来像这样

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}

您可能需要编辑前缀以匹配您的安装前缀

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

卸妝后依然美 2024-11-03 12:25:39

我在 Ubuntu Precise 中运行了这个。我必须安装以下软件包,并对前面提到的 gtk+-2.0 进行更改。

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

可以在此处找到有关使用的一些背景信息 - https://web .engr.oregonstate.edu/~hess/publications/siftlib-ammmm10.pdf

bin/match 和 bin/siftfeat 都为我工作,并生成带有箭头的图像,显​​示提取特征的位置

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文