cpp-template-layout is a template for a simple Visual Studio based C++ solution: it can be used as a base for new projects.
It is designed for Visual Studio Community 2019 for single or multiple projects inside one solution.
This project has been set up with a specific file/folder structure in mind. The following describes some important features of this setup:
bin: Contains the final executabiles (generated)build: Contains intermediate files generated during build time (generated)include: Public projects header files that need to be exposed (generated)lib: External libraries used in the projectssrc: Solution source files (*.cpp), organised in separate folders for multiple .vxcproj projects or only amain.cppfor single projects
- This github project is just an example. I am going to show you how I made the solution as it is.
- Create an empty solution.
- Switch to Folder view by clicking Toggle between Solution and Folder views.
- Add the folders bin, build, docs, lib, src
- Switch to Solution view by clicking Toggle between Solution and Folder views.
- Right click the solution and add the first project in the src folder! You can add multiple projects in this step.
- Right click the first project and enter
$(SolutionDir)bin\$(Configuration)\in Properties/General/OutputDirectory. - Right click the first project and enter
$(SolutionDir)build\$(ProjectName)\$(Configuration)\in Properties/General/IntermediateDirectory.
You can generate the .gitignore file using gitignore.io