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

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

问题描述

我想添加一个动态配置路径(从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 ++ general->路径和符号 - >包括tab->添加...->添加目录path->变量,但我只能选择现有的变量,如何创建一个新变量从命令行程序动态生成?像 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 post ,但我还是不知道它如何帮助这个特定的情况

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中添加include路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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