如何使用C ++ Boost库与pkg配置? [英] How to use C++ Boost library with pkg-config?

查看:409
本文介绍了如何使用C ++ Boost库与pkg配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我成功编译并安装最新版本的Boost库的到我的Linux机器。
现在,我希望能够使用的pkg-config来缓解提供链接paremeters与海湾合作委员会的过程。

I successfully compiled and installed the latest version of the Boost library onto my linux machine. Now, I would like to be able to use pkg-config to ease the process of providing linking paremeters with GCC.

由于我的手工编码我自己的.PC文件太懒,是有一个脚本/工具,它会自动生成所需的.PC文件或以其他方式更新pkg配置与提升的标志吗?

Since I am too lazy for hand-coding my own .pc file, is there a script/tool which would automatically generate the needed .pc file or in some other way update pkg-config with boost flags?

(如果有人已经具有.PC文件,A股将受到欢迎,以及。)

(If someone already has that .pc file, a share would be welcome as well.)

推荐答案

您在找什么,似乎有点复杂,长期要求的功能,在这家3岁后的https://svn.boost.org/trac/boost/ticket/1094 对Boost的的 TRAC 的。通过它读取显示该功能被一再推迟,并没有实施(如1.4.3)。无法生成由pkg配置可使用的.PC文件的原因情况与提升的矛盾做在他们的命名库的版本/构建变种。

What you're looking for seems to be a bit complicated, and a long-requested feature, as indicated in this 3 year old post https://svn.boost.org/trac/boost/ticket/1094 on Boost's trac. Reading through it shows that the feature was repeatedly postponed and never implemented (as of 1.4.3). The cause of the inability to generate a .pc file usable by pkg-config happens to do with boost's inconsistency in naming their library versions / build variants.

FWIW,为自动化的建设过程中的替代方法是使用自动工具(Automake / Autoconf的)。有可能是使用你(我不能发表,因为这么认为我是一个垃圾邮件发送者,而不是一个新人!)的一个环节,只是谷歌纲提升M4 GitHub上,它应该带你去:)

FWIW, an alternative for "automating" your building process is to use autotools (autoconf/automake). There's a link that might be of use to you (which I can't post because SO thinks I'm a spammer instead of a newcomer!), just google "tsuna boost m4 github" and it should take you there :)

这篇关于如何使用C ++ Boost库与pkg配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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