在Ubuntu定位Boost库 [英] Locating Boost Libraries in Ubuntu

查看:754
本文介绍了在Ubuntu定位Boost库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想构建一个利用Boost库 program_options 输入输出流的自动工具项目。为此我安装这些库:

I want to build an autotools project which is making use of the boost libraries program_options and iostreams. Therefor I install those libraries:

sudo aptitude install libboost-iostreams-dev libboost-program_options-dev

现在 ./配置是罚款和编程'编译。然而,链接失败:

Now ./configure is fine and the progam compiles. However the linking fails:

/usr/bin/ld: cannot find -lboost_program_options-mt
/usr/bin/ld: cannot find -lboost_iostreams-mt

这是一个有据可查的问题,可以通过固定的自动工具的东西,或通过链接 boost_program_options boost_program_options-MT 等等。我选择做后者,因为这不是我的项目。但是我没有找到安装在Ubuntu库:

This is a well documented issue and can be fixed either by fixing the autotools stuff or by linking boost_program_options to boost_program_options-mt and so forth. I choose to do the latter since this is not my project. However I am failing to locate the libraries installed in Ubuntu:

locate *boost*

返回的文件和包信息,我不找一些Boost库列表。 查找* program_options * 是空的。图书馆是不是在 / usr / lib目录 / lib目录 ...任何想法?

returns a list of documentation and package information and some boost libraries I am not looking for. locate *program_options* is empty. The library is not under /usr/lib or /lib ... Any ideas?

推荐答案

对于我来说他们是在/ usr / lib64下在Ubuntu 13.04。但我会用提升M4
让autotool自动把这些依赖的照顾。因此,通过在您configure.in提升M4,您可以指定哪些提升模块,并且你需要的版本。 Morever它也将找到您所需要的路径。

For me they are under /usr/lib64 in ubuntu 13.04. But I would use boost m4 to let autotool take care of these dependencies automatically. So by including boost m4 in your configure.in, you can specify which boost modules and versions you require. Morever it would also find the required paths for you.

这篇关于在Ubuntu定位Boost库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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