Project with multiple binaries in Eclipse CDT

半城伤御伤魂 提交于 2019-12-07 16:47:14

问题


I think it is quite normal to have more than one binary in a project. However, with Eclipse CDT I don't know how to set up the IDE to get things done.

I know I can create several projects - one per binary. And I know I can set the dependencies per project. However, I cannot regard them as one project in Eclipse. If I'd like to share the code with a version control system (like svn), each developer has to import the projects separately.

What I miss is something like the Solution (sln file) in Visual Studio. Should I create a single project and create the make files by myself?

I haven't tried it out yet, but there is this 'project set' which can be ex- and imported. Is this the solution? Can this be put into version control?

My goal it to put everything under version control, not only subprojects. I cannot imagine that CDT makes only sense for single-binary applications.

How can I work properly?


回答1:


I am quite sure CDT doesn't support sub-projects, which leaves you pretty much with:

  • one workspace per "set of projects"
  • one project per binary (like you mention in your question)
  • project dependencies (like you mention in your question)

In term of version control, that means:

  • submodules (Git),
  • subrepos (Mercurial) or
  • external (SVN)

for each project needing a shared library project.
In short, that means putting under version control various components (set of files), with one referencing specific version of others (that list of specific versions of other components is called a "configuration", based on a component-based approach development)



来源:https://stackoverflow.com/questions/2617414/project-with-multiple-binaries-in-eclipse-cdt

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