代码块,单个项目,许多可执行文件 [英] codeblocks, single project, many executables

查看:127
本文介绍了代码块,单个项目,许多可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Code :: Blocks 和C ++。我的项目应该构建多个可执行文件(使用共享库的小工具集)。

I use Code::Blocks and C++ . My project should build multiple executables (set of small tools that use shared libraries).

如何设置CB生成多个二进制文件,每个都有自己的 main()

How to set up CB to generate multiple binaries, each with its own main()?

推荐答案

查看 CodeBlock的manuel ,特别是第1.8章,它有这个工作空间的例子:

Take a look into CodeBlock's manuel, specifically chapter 1.8, where it has this workspace example :


项目A包含基本功能,以图书馆的形式提供给
其他项目。现在,如果这个
项目的源被修改,那么库必须重建。为了维持使用函数的项目B和实现函数的项目A
之间的
一致性,项目B必须依赖于项目A.
存储项目的依赖性的必要信息在
中的相关工作区,这样每个项目都可以分别创建
。依赖关系的使用使得还可以通过
控制生成项目的顺序。项目的
依赖项可以通过选择菜单
'Project'/'Properties'然后点击'项目的依赖'
按钮来设置。

A project A contains fundamental functions which are made available to other projects in the form of a library. Now, if the sources of this project are modified, then the library has to be rebuilt. To maintain consistency between a project B which uses the functions and project A which implements the functions, project B has to depend on project A. The necessary information on the dependencies of projects is stored in the relevant workspace, so that each project can be created separately. The usage of dependencies makes it also possible to control the order in which the projects will be generated. The dependencies for projects can be set via the selecting the menu ’Project’ /’Properties’ and then clicking the ’Project’s dependencies’ button.

这篇关于代码块,单个项目,许多可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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