Antony Antony - 3 months ago 45
C++ Question

Multi-platform C++ project structure

I actually need help on how to structure my project (the directory tree).
I plan to code a network library split in multiple parts (one for server, one for client etc)

I am actually coding on Windows but I plan to make it multi-platform in the future.

My current setup is:

Solution folder
- doc // Doxygen generated documentation
- include // Public headers
- lib // Output libraries
- Debug
- Release
- source // Private implementation and headers

My question is, where am I supposed to put the project files for each IDE ?
Visual Studio generates multiple files per project, I don't know where am I supposed to store them, as there might be another IDE that does it as well.


Don't include any of the files generated by the IDE in your project. Let each developer choose their own IDE. Just package the files relevant to the program/library itself when you distribute the source code and let each developer import it into their own preferred IDE.

You will have to choose some cross-platform way of building the progs/libs.

Makefile is pretty universal. Most IDEs can run a project from its Makefile. Or you can use one of many cross-platform build systems that generate a Makefile.

Also you may want to keep your sources under version control such as git.