I'm working on 300K line C/C++ Windows application that is spread across 23 different Eclipse projects (approximately one third for Qt interface, one third for DLLs and one third for static libraries).

I have complained to the project manager that it's cumbersome to work with so many different projects for one single piece of software. For example, if I change one thing at a static library, I will probably have to recompile at least 5 other projects.

Am I right to complain or is this how most similar projects are managed? Is there any reference on how it should be done?

  • 6
    Firstly, project-management isn't this. Secondly, this is definitely the norm. Your IDE should make the recompilation quick and easy. Tossing every source file into a single project would be far, far more cumbersome.
    – Telastyn
    Jan 28 '14 at 19:46
  • And you really believe by throwing 300K of code into one big ball of mud, you will make the project easier to handle? Oh dear. If your compile and link times are bad, get a copy of "Large Scale C++ Design" (amazon.com/Large-Scale-Software-Design-John-Lakos/dp/0201633620) and try to apply some of the techniques described there.
    – Doc Brown
    Jan 28 '14 at 21:26
  • Doom 3, which has been said to be an example of beautiful code, spans over 600K lines of code and is divided in only 7 projects. I was not suggesting turning 23 projects into one, but rather reducing granularity to make it more manageable. Jan 29 '14 at 2:17
  • @PedroTabacof: I am pretty sure the code of Doom 3 could have been even more beautiful and more manageable by dividing it up into more smaller projects. And if you read that article carefully, you see that the described "beauty" of the code is discussed in terms how the design of single functions looks like (comments, responsibility, variable names, consistency), and not in terms of modularity.
    – Doc Brown
    Jan 29 '14 at 7:47

If the product I worked on was all in one (or even some small set) of projects, it would take days (literally) to compile the whole thing.

A proper source tree that explicitly states its dependencies is critically important to enable things like partial/incremental builds, but the number of projects is not a metric that you should need to concentrate on optimizing for.

In your case, you likely work on some shared resource/library, which is what is requiring recompilation of all the projects that have taken a dependency on it. To an extent you can minimize recompilation with SOA and having hard restrictions on the changes people are allowed to make to the contract/interface of the service.


Instead of focusing on the number of modules, it's more important to look at whether or not the responsibility of each of these projects/modules are well defined. Talking to previous designers/developers will certainly help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.