opencv在哪里安装它的ubuntu中的libs [英] Where does opencv install it's libs in ubuntu

查看:322
本文介绍了opencv在哪里安装它的ubuntu中的libs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了ubuntu 10。我安装了我可以在软件中心找到的所有opencv包。我希望它在我的项目中可以引用的某个地方安装一些.lib文件,但是我找不到它们。我们要用eclipse作为c ++中的ide编程,但是在找到如何最初设置它的时候,我遇到了问题。我很喜欢在eclipse和ubuntu中进行编程,所以如果有人有一步一步的指导,我很乐意看到它。

解决方案

p>您可以使用 pkg-config --libs opencv 找到正确的链接标志,正确的包括使用 pkg-config --cflags opencv



实际库应安装在/ usr / lib中,并具有libhighgui.a或libhighgui.so等名称,但您可能不需要直接引用。只需在Eclipse的适当位置使用上述命令的输出来设置链接标志并包含目录。如果您真的想知道哪些库是OpenCV相关的,则 pkg-config --libs opencv 的输出将为您提供名称。例如,该命令的输出之一是-lhighgui,所以我们知道在/ usr / lib中应该有一个名为 libhighgui.so 的文件。



我没有在C或C ++中使用Eclipse,所以我不记得这些选项是在哪里,但它们在某处。


I have ubuntu 10 installed. I installed all the opencv packages I could find in the software center. I expect that it installs some .lib files somewhere that I can reference in my project, but I can't find them. Where does it put them?

I want to use eclipse as the ide programming in c++, but I am having problems finding out how to get it setup initially. I am new to programming in eclipse and ubuntu in general so if anyone has a step by step guide I would love to see it.

解决方案

You can find the proper link flags using pkg-config --libs opencv and the proper includes using pkg-config --cflags opencv.

The actual libraries should be installed in /usr/lib and having names such as libhighgui.a or libhighgui.so, but you likely won't have to reference those directly. Just use the output of the above commands in the proper place in Eclipse for setting link flags and include directories. If you really do want to know which libs are OpenCV related, the output of pkg-config --libs opencv will give you the names. For example, one of the outputs of that command is -lhighgui, so we know there should be a file named libhighgui.so in /usr/lib.

I haven't used Eclipse in a while for C or C++, so I can't remember where those options are, but they are around somewhere.

这篇关于opencv在哪里安装它的ubuntu中的libs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆