Eclipse CDT的+ SCons的 [英] Eclipse CDT + SCons

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

问题描述

我们在使用scons的用于建筑物的一个相当大的C / C ++项目。我想去以试图通过Eclipse的CDT建立这个。任何人有任何这方面的经验,并能告诉我的步骤来设置scons的作为一个建设者。 (不使用SConsBuilder插件,它不会与Eclipse的CDT在Fedora-11工作)。


解决方案

我试过的 WAF在Eclipse CDT 之前现在,SCons的将是非常相似的。该解决方案是创建一个空的Makefile的项目,然后简单地改变制造在选项scons的。在Windows中,将可能需要在你的路径scons.bat文件。这是不是比创建一个具有所有虚设的Makefile好得多:它\\ n \\ tscons 输入模式,但最少工作

借助 SConsBuilder插件是不是一个好主意。它有一大堆硬codeD蟒蛇code在那里,它吐出一个SConstruct。它没有在年龄被更新和大量的code大概是现在在SCons的pcated德$ P $。我认为,更好的方法是做什么的呢SCons的Visual Studio的,还是什么CMake的确实为Eclipse CDT的。这意味着产生的飞行一个.cproject文件,根据您的生成配置。

我在一个点,它走采集源文件构建节点和吐出写了WAF 的 Eclipse项目发生器。项目.cproject文件。类似的CMake怎么做的,但WAF的创建variant目录的默认行为意味着你不必处理外源构建问题。这已经被添加为 href=\"http://$c$c.google.com/p/waf/source/browse/waflib/extras/eclipse.py\">额外。它使用WAF API的一部分,因此将有可能把它与工作的一些小十岁上下的金额转换给SCons。换句话说,有没有什么在那里。该.cproject格式是不是真的记录任何地方相比,Java版本实在是太丑了。

我没有和CDT得到太清楚不过 - 这背后是在Java开发工具很长的路要走 - 我仍然使用的Vim :让,所以它一切都有点学术到底。

We have a fairly large C/C++ project using scons for the building. I'd like to go at an attempt to build this through Eclipse-CDT. Anyone have any experience with this and can tell me the steps to set up scons as a builder. (NOT using the SConsBuilder plugin, it will not work with the Eclipse-CDT from Fedora-11).

I've tried Waf in Eclipse CDT before now, SCons would be really similar. The solution was to create an empty Makefile project, then simply change "make" to "scons" in the options. On Windows that would probably need the scons.bat file in your path. That is not much better than creating a dummy Makefile that has an all:\n\tscons type pattern in it, but is the least work.

The SConsBuilder plugin is not a good idea. It has a whole bunch of hard coded python code in there that it spits out to a SConstruct. It hasn't been updated in ages and a lot of code is probably deprecated in SCons by now. I think a better approach is to do what SCons does for Visual Studio, or what CMake does for Eclipse CDT. That means generating a .cproject file on the fly based on your build configuration.

I wrote an Eclipse project generator for Waf at one point, which walks the build nodes gathering source files and spits out a .project and .cproject file. Similar to how CMake does it, but Waf's default behaviour of creating a variant directory means you don't have to deal with out-of-source build issues. This has since been added as an extra in waf itself. It uses only part of the Waf API so it would be possible to convert it to SCons with some small-ish amount of work. In other words, there's nothing much out there. The .cproject format is not really documented anywhere and is really ugly compared to the Java version.

I didn't get on too well with CDT though - it is a long way behind the Java dev tools - and I still use Vim with :make, so it was all a bit academic in the end.

这篇关于Eclipse CDT的+ SCons的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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