I would like the windows directory tree to mimic the unix tree as closely as possible, but I don't want duplicate files and other inconsistencies. I have come up with an idea but I don't know how close it fits a "typical" windows project. If you know of specific links that deals with this subject, please post them.
The unix project creates a single library from the app directory tree and the test directory tree is the corresponding set of unit tests for the app tree. The structure of the unix project is:
- unix_project
- include
- lib
- app
- util
- math
- string
- util
- test
- util
- math
- string
- util
Unix Include Directory
The main problem I'm having with the directory structure is converting the unix include directory over to a windows directory. Windows has a "common" directory concept. In this case, can I rename the include directory to common? Is this the usual use of common and header files? I thought of getting rid of the include/common directory, but the include/common directory is needed when distributing the library.
Also, the files in the unix include directory are links to the header files under the app tree. The links allow the user to edit the header locally or in the include directory and end up modifying the same file. In windows, it looks like I'll have to move the headers files over to the common directory to avoid duplicate header files
Visual Studio Setup
Visual Studio has the concept of a solution and project and little else. After playing around with VS for a while I came up with the following structure.
The "solution" would the the unix/windows project and the "projects" will be app and the various executables under test. By using solution folders and project filters (?) I was able to mimic the unix tree very closely.
One odd artifact came from putting all the headers files in a solution folder called common. This appears to be purely cosmetic and allows users to see the header files.
I tried making multiple projects under app (i.e. app/util/math and app/util/string) that modified the same static library, but this didn't work. I couldn't get them to work together. Math would wipe out string changes and vice versa. This appears to be a limitation of the VS project.
I have a similar problem with the test tree. I have two different test executables under the test/utill/math tree(i.e. mathUtil and random). Does this mean I need two projects? VS keeps creating new directories for each project, that I really don't want. Is it possible to have multiple executables in the same project?
Also, if there is something I missed, let me know.