codeblocks, single project, many executables

☆樱花仙子☆ 提交于 2019-12-10 05:48:04

问题


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

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


回答1:


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

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.



来源:https://stackoverflow.com/questions/8411905/codeblocks-single-project-many-executables

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!