1

i want to restructure a large scale c++ project which has several parts. I will list some of this parts and some attributes which hopefully should be considered:

  • BaseClasses, this is restricted to a small separate group of developer. This are about 15 DLLs
  • MainProject, this is open source for all developer, this are about 10 DLLs.
  • several Pluginprojects, which are open for every plugin-membergroup (every plugin is one special group of developer), currently about 20 Plugin-DLLs.
  • 3rd Party stuff like PDF Lib, Boost, (in future maybe also wxWidgets), some geometry stuff, etc. Most of the with source, some not.

Currently this is developed with VisualStudio on Windows OS (only 32Bit by now) with little MFC and ATL stuff. Versioned with SVN and GIT (last for some 3rd party libs).

To look further, we want (maybe have) to create a multi platform application. In the long run, this should work on different platforms and use cross platform tools etc. A single build run for all parts would be very good. Maybe CMake can help here.

I have read a lot of questions in SO about structures etc. but can´t find the right answers. Also books like API Design or John Lakos "Large Scale .." are on my bookshelf. I also looked into several open-source projects.

Is there a recommendation/ experience / tips / books about how to make the folder- and project-structures and dependencies for such an application ?

Thanks in advance, Howie

2
  • 1
    Qt might be a source of inspiration. Jan 18, 2012 at 13:00
  • 1
    I wouldn't expect a good answer to so broad question. Try to split it, e.g. "cross-platform build", "how to effectively deal with different source controls inside large project", "directory structure for large project" etc. Jan 18, 2012 at 13:13

1 Answer 1

2

Well, I recommend you do a separation by software modules. Also create a directory structure based on the same.

Would look something like:

  • / - Contains the CMakeLists (or your Makefile), LICENSE and more...
  • /deps - All project dependencies (like CMake Modules, Embbed Librarys)
  • /docs - Doxygen Documentation
  • /include - Contains the "base.h" header for example
  • /include/ModuleNAME - Headers of some module
  • /source - The general source files
  • /source/ModuleNAME - Specific module source file
  • /plugins - Plugins in DLLs or something

Well, I think it's a good structure. I recommend that you review the source code of Qt, Boost, MongoDB and other large projects.

Or you can look my project in GitHub: Sundry Framework

2
  • I know it is a broad question. But splitting the question would lead to more different answers for a particular task, where some of them would not fit to the whole problem (it is my opinion).
    – howieh
    Jan 19, 2012 at 8:19
  • Mentioned project is now defunct.
    – lorefnon
    Mar 14, 2013 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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