Organizing Files in Code Blocks

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

Firstly, it seems that creating “virtual folders” in Code :: Blocks is quite natural, but then all the files on the disk are in the root folder of the project, and it seems useless to me: if I want to do something outside the code :: Blocks, files are hard to find. Should I use this method anyway?

Then, if I create “real” folders every time I need them, I need to add them to the path so that they can be built. Also, Code :: Blocks doesn't seem to like it. Is there an easy way to say that Code :: Blocks "builds a project as if the files in subfolders in my project directory are right inside the project root directory"?

I did not find on the Internet how a project is usually organized using Code :: Blocks, any links are welcome

+6
source share
2 answers

organization of large projects

If you are creating a new project, coding a new software application or want to reorganize existing code, structure the project well. Although there are probably hundreds of ways to structure, and although there are many things to consider, here I would like to give you one possible approach that really worked for me again and again. This example / suggestion is a summary of my research on this topic, so it’s not just an “idea”

There are three "main" issues that need to be addressed when organizing a project:

From medium to large projects, not to mention all projects, there should be a controlled version (GIT as an example).

from medium to large projects, and not for all projects, should be supported by the project generator (Cmake example).

It would be impossible, for a medium and large project, to save all the files in one physical directory. He is even very discouraged (by several manuals, including the Linux kernel). You must organize these files physically logically .

Example file structure of physical projects:

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

This, unfortunately, in code :: blocks, means that you will need to include all the physical folders of the project in the search path.

You can organize your files inside the :: blocks code in any way you want, practically the same, but if your physical structure is logical, your project should be intuitive to view!

code :: blocks does not allow virtual paths.

hope this helps

KR

Hewi

+3
source

In one of my projects in Code :: Blocks, I use different folders in the source folder; client, shared and server.

Then I have different compilation goals, so the client compilation goal will use the source files found in the client and the general ones, and the server compilation goal will use the source files found on the server and the general ones.

Not sure if this is what you need, but here is an image of what my project looks like: enter image description here

0
source

All Articles