Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 70569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:45:05+00:00 2026-05-10T19:45:05+00:00

There seems to be two major conventions for organizing project files and then many

  • 0

There seems to be two major conventions for organizing project files and then many variations.

Convention 1: High-level type directories, project sub-directories

For example, the wxWidgets project uses this style:

/solution    /bin       /prj1       /prj2    /include       /prj1       /prj2    /lib       /prj1       /prj2    /src       /prj1       /prj2    /test       /prj1       /prj2 

Pros:

  • If there are project dependencies, they can be managed from a single file
  • Flat build file structure

Cons:

  • Since test has its own header and cpp files, when you generate the unit test applications for EXE files rather than libraries, they need to include the object files from the application you are testing. This requires you to create inference rules and expand out relative paths for all the source files.
  • Reusing any of the projects in another solution requires you to extract the proper files out of the tree structure and modify any build scripts

Convention 2: High-level project directories, type sub-directories

For example, the Wireshark project uses this style

/solution    /prj1       /bin       /include       /lib       /src       /test    /prj2       /bin       /include       /lib       /src       /test 

Pros:

  • Projects themselves are self-contained within their folders, making them easier to move and reuse
  • Allows for shorter inference rules in the build tools
  • Facilitates hierarchical build scripts

Cons:

  • If there are dependencies between projects, you need an additional layer of build scripts above the project directories to manage the build order

We are currently using convention 1 on our project and so far it has worked fairly well. Now, I am in the process of adding unit testing (via CxxTest) and facilitating the migration to continuous integration using nmake, convention 1 is causing some serious headaches in the creation of the proper nmake files.

My primary requirements/goals are:

  • Reduce the level of effort to maintain the build scripts of the entire solution.

  • De-couple projects and their build steps within a solution from other projects.

  • Facilitate continuous integration via the use of build scripts for check-out to release media generation for each commit (obviously leveraging other tools such as CruiseControl as well).

  • Make adding or removing additional projects or source files as easy and least error-prone as possible for the developers.

So I ask:

  • Are there other pros and cons of either of these methods?
  • Is there a clear agrument that favors only one of these conventions?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:45:06+00:00Added an answer on May 10, 2026 at 7:45 pm

    [A partial answer.]

    In ‘Convention 2: High-level project dirs, type sub-directories,’ your single con is

    If there are dependencies between projects, you need an additional layer of build scripts above the project directories to manage the build order

    That can also be viewed as a pro, in many projects.

    If you have a lot of repetitive general definitions, one would probably want an include file for the build scripts, where solution-wide constants & parameters could be defined. So the ‘additional layer of build scripts’ will frequently happen anyway, even if there are no (direct) dependencies.

    It’s a pro in that there’s still room for a more modular approach in building. On the other hand, if you want to reuse a project in another, unrelated solution, you would need to compose a different definitions file. (On the other other hand, if there were a single build file for the whole solution, as in Convention 1, you would need a different build script.) As for your maintenance requirement, that’s (IMO) very project-dependent.

    My feeling leans towards Convention 2, but it’s far from a clear win. In fact, your experience with Convention 1, which was working well until recently, may be the biggest pro of all: a team of people with experience with a certain organization is a valuable asset.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There seems to be two styles of folder structure in the core Magento when
When invoking a WCF service asynchronous there seems to be two ways it can
It seems that these two operators are pretty much the same - is there
It seems to me that there are two scenarios in which to use JOINs:
There are two major refactoring tools which can be installed for Visual Studio that
I guess there are two major approaches to date representations in XML: <date>1984-10-27</date> and
I am working on a Silverlight 4 project and there is a major memory
There are two major ways in getting components in ExtJS 4. By a global
To get an application installed on a new computer there seems to be two
Reading some Verilog code, there seem to be two ways of defining arguments in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.