Best folder structure for C++ cross-platform library and bindings

前端 未结 4 1486
迷失自我
迷失自我 2021-01-29 18:44

I am about to begin work on a cross-platform library to be written in C++. Down the road, I intend to implement bindings for other languages such as Python, Java, etc. The lib

4条回答
  •  说谎
    说谎 (楼主)
    2021-01-29 19:31

    The structure looks good to me, but there are a few points:

    • it's normal to separate C++ header and source files into different directories, or maybe there is structure in the modules directory you are not showing?
    • you probably want directories to put intermediate files like *.obj in
    • you will need different directories for debug and release output files
    • a directory for installers like InnoSetup and their install files can be useful - you have to make the philosphical decision about whether to version control these

    As for tools to create the structure, a few minutes spent writing a bash script is all you need - it's worth having the same tools (like bash) available on all platforms.

提交回复
热议问题