![codeblocks compiler grayed out codeblocks compiler grayed out](https://i.ytimg.com/vi/CsoLYmz4o5E/maxresdefault.jpg)
![codeblocks compiler grayed out codeblocks compiler grayed out](https://i.imgur.com/jZLoWnS.png)
When I select the Release target, only main.c and lib_release.c should be in black, lib_debug.c and lib.h in gray. When I select the Debug target, only main.c and lib_debug.c should be in black, lib_release.c and lib.h in gray. But that of course ignore my target setup, so it's not the way to go. To get them actually gray out (like lib.h), I should right click on them, and disable both the build and link stage. Observe that in the tech tree, both lib_debug.c and lib_release.c are listed in black, as if they could be actually built, whenever the selected target is. The build actually work as intended, of course, with both target. Then, right clinking on each of lib_debug.c and lib_release.c and (Properties./Build) show that this setup is well understood (lib_debug.c got only teh Debug target selected for build/link, and same for lib_release.c in Release target) I've setup this in the properties of the project (Project/Properties/Build Target menu), and ticks the file I want for each target. So, my target Debug build main.c and lib_debug.c, and the Release one build main.c and lib_release.c c because implementation of this library completely change if I'm building in release or debug mode, but the API stay the same. I have a main file, and a library that is composed of two c file and a header. Let's consider the following project in project_test.zip: