eclipse cdt:从pkg-config添加包含路径 [英] eclipse cdt: add include path from pkg-config

查看:198
本文介绍了eclipse cdt:从pkg-config添加包含路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想添加动态配置路径(从pkg-config生成)到我的项目。 (这基本上是针对第三方的依赖关系,如boost,所以工作区包含不是适用的,而且文件系统不包括因为硬编码,每个开发人员都必须手动更改)。

i want to add a dynamic configuration path (generated from pkg-config) to my project. (this is basically for third-party dependencies like boost, so workspace includes is not appropiate, and filesystem include neither because that would be hardcoded and every developer would have to change that manually)

我在项目属性 - > c ++通用 - >路径和符号 - >包括tab-> add ...->添加目录路径 - >变量,但我只能选择现有的变量,我如何创建一个新的从命令行程序动态生成的变量?像 pkg-config --cflags boost-1.43

i am on project properties->c++ general->paths and symbols->includes tab->add...->add directory path->variables but i can only select among existing variables, how do i create a new variable dynamically generated from a command line program? like pkg-config --cflags boost-1.43?

这在netbeans中很容易做到;您只需在构建附加选项中添加带有反引号的pkg-config命令行,并解析构建包,甚至在理论上它应该更新索引器(尽管说实话,上一次索引器正确地从pkg-config更新已经在netbeans 6.8,它已经在6.9和6.9.1上被打破了)

this is easy to do in netbeans; you just add the pkg-config commandline with the backquotes in the build additional options and it resolves the build include and even in theory it should update the indexer (although truth be said, last time the indexer was correctly updating from pkg-config was on netbeans 6.8, it has been broken on 6.9 and 6.9.1)

我读了这个StackOverflow文章,但我仍然不确定它如何帮助这个具体情况

i read this StackOverflow post but i still not sure how it helps this specific case

我阅读了某处你可以使用$(shell pkg-config ...)来生成环境变量,但不知道在哪里放置命令

i read somewhere that you can use $(shell pkg-config...) to generate environment variables but not sure where to place the command

如果没有简单的盒子解决方案我将尝试此博文中的脚本

if there is no easy out of the box solution i'll try the script in this blog post

btw,我使用eclipse helios -cdt 7

btw, i'm using eclipse helios -cdt 7

谢谢!

推荐答案

Pkg-config支持终于来到CDT,并将在8月份完成。

Pkg-config support is finally coming to CDT and will be finished on August.

http://code.google.com/p/pkg-config-support-for-eclipse-cdt/

这篇关于eclipse cdt:从pkg-config添加包含路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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