Organization of files in Code Blocks

前端 未结 2 1077
天命终不由人
天命终不由人 2021-02-04 13:13

I am currently working on a medium/large project on Code::Blocks and I am wondering how to organize my files.

First, it seems that creating \"virtual folders\" in Code::

2条回答
  •  广开言路
    2021-02-04 13:46

    large projects organisation

    If you are creating a new project, coding a new software application or want to refactor existing code, it's a good to properly structure your project. While there is probably hundreds of ways to structure and while there are many thing to consider, here I would like to give you one possible approach which has really worked for me over and over. This example/proposal is the summary of the years of research I have done regarding this topic, so it's not just 'an idea'

    There are three 'main' issues you definitely need to address when organising a project:

    Medium to large projects, not to say all projects, should be version controlled (GIT as an example).

    medium to large projects, not to say all projects, should be maintained by a project generator (Cmake as an example).

    It would be impossible, for a medium to large project, to keep all files in the same physical directory. It is even strongly discouraged (by several guidelines including linux kernel). You should organize these files in a physical logical manner.

    An example physical projects file structure would be:

    ~example/environment$project tree .
    .
    |- code
         |- core
         |- extern
    |- docs
    |- tests
         |- core_tests
         |- extern-tests
    |- ...
    

    This, unfortunately in code::blocks, means you will have to include all your project physical folders to the search paths.

    You can organize your files inside code::blocks in any way you want, virtually too, but if your physical structure is logical, your project should be intuitive to browse!

    code::blocks does not allow to include virtual paths.

    hope this helps

    KR

    Hewi

提交回复
热议问题