博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
eclipse scons 使用指南
阅读量:6003 次
发布时间:2019-06-20

本文共 4338 字,大约阅读时间需要 14 分钟。

http://sconsolidator.com/projects/sconsolidator/wiki/Getting_Started

Add SCons support to an existing project

To add SCons support to an existing C/C++ project, just right click on the project(s) in the project explorer and choose one of the following two submenus of SCons:

  • Use self-provided SCons build (aka "existing mode") for projects where you provide the SCons build files
  • Use generated SCons build (aka "managed mode") for projects where SConsolidator should create and update the SCons build files

Notice that you should use managed for simple C/C++ projects only. It can be considered as a good starting point if you are not yet familiar with SCons. As soon as your projects grow in size and complexity, you want to use your own provided SCons build files.

For non-C/C++ projects, you only have one menu named Add SCons support.

Building projects with SCons

If you request a build, the output of a SCons build run is shown in a project specific console. Compile errors are shown in red and hyperlinks are provided to directly jump to the location in the editor where the error was found by the compiler. Error markers are created for the compiler errors as we are used from Eclipse.

Target View

SCons target view shows all the SCons projects in the current workspace and allows you to maintain the targets on a project level. To request a build for a specific target, you have to select it in the view and click the build button in the upper right corner. The same can be achieved for a build in the interactive console.

There is a dialog to create a new target for a SCons project. There you can define the name of the target and additional SCons options which will be used when SCons is invoked. Furthermore, you can also specify a target alias which is also shown in the target view.

Dependency View

The dependency view visualizes the dependencies of the selected target SCons has emitted. You can choose a target of a SCons project in the workspace with a click on the lookup symbol in the upper right corner. The dependencies are then shown in the graph area.

C/C++ specific support

Create new SCons based C/C++ Managed Project

To create a new SCons based project, you can use the New Project wizard of Eclipse and choose C/C++ project. There you can see three new project types for SCons managed projects: executableshared library and static library project.

SConsolidator also provides a facility to convert existing managed projects to SCons projects with a context menu on the project level (SCons -> Add SCons support) and with a wizard as shown in this figure.

Import of Existing SCons based C/C++ Project

SConsolidator helps you to import existing SCons based C/C++ projects with a wizard. You can choose the location where the code of the existing project is located. If the location contains an Eclipse project, the name of the project is deduced and shown in the corresponding input field. In case you want to set further options for the initial SCons run, you have the possibility to put them in the field SCons options. SConsolidator will then try to gather all include paths and macros of your project necessary for the CDT indexer to properly work and store them in the project settings.

Refresh SConsolidator after altering the SCons build

SConsolidator helps you to keep the build settings of your SCons build consistent with your Eclipse CDT project by (one-way) synchronizing the used include paths and macros. Whenever you changed your SCons build in a way that affects the used include paths or macros, click on the icon with the Switzerland flag in the toolbar or use the project context menu Refresh C/C++ project from SCons of SConsolidator. Both actions run your SCons build and collect all the necessary information for Eclipse CDT to work as expected.

Interactive Console

To build single targets without the need to invoke full builds with every change, we provide an interactive console with SConsolidator where you have all the possibilities known from SCons' interactive mode. We allow building and cleaning of the corresponding target(s) for the source file currently loaded in the active editor and a redo of the last action as can be seen from the buttons. Of course, you can also type SCons commands in the interactive console directly.

转载于:https://www.cnblogs.com/heidsoft/p/3815151.html

你可能感兴趣的文章
VS2010安装完SP1后再安装Silverlight Tools 4遇到的问题解决办法
查看>>
校验插入指定结点是否导致编码循环的示例函数
查看>>
编码问题
查看>>
Sharepoint学习笔记-- Debug&TroubleShooting--调试Sharepoint环境中的Javascript/ECMAScript
查看>>
Oracle Bitmap 索引结构、如何存储及其优势
查看>>
【OpenStack】OpenStack系列7之Nova详解
查看>>
高级 Angular 组件模式 (7)
查看>>
Hello Vue: Vue快速入门教程
查看>>
笔记 | Node.js基础开发指南
查看>>
区块链概念 That You Must Know 第二期
查看>>
css伪类和伪元素的学习
查看>>
达到1000声望以后
查看>>
spring webflux文件上传下载
查看>>
【365天】跃迁之路——程序员高效学习方法论探索系列(实验阶段123-2018.02.05)...
查看>>
我的第一个小程序(Discuz! + 微信小程序)
查看>>
解决Genymotion无法拖拽的问题
查看>>
前端自动化构建之Gulp的使用(学习笔记)
查看>>
js递归原理之return
查看>>
浏览器的回流和重绘及其优化方式
查看>>
centos配置ssh免密码登录后,仍提示输入密码
查看>>