Bug #16826 2010-02-10 21:39

nixscripter

Changing compile targets hides build products

It took me several minutes of frustration to discover this problem in version 8.02. I don't know if it is a bug, but it is very annoying.

1. Create a C++ project.

2. Create a .cpp and a .h file containing a simple class.

3. Open the header file's Properties under the right click menu. Under the Build tab, enable compiling this file.

4. Build the project. The header file should be pre-compiled.

5. Open the header file's Properties under the right click menu again, and disable compiling the file.

No matter how you change the file from this point on, it will use the version of the header file that was precompiled back then. Future changes to the file will be ignored. Even if you clean the project, it doesn't see the precompilation in its build instructions, and so will leave the .gch file alone. You have to re-enable compiling it, then clean, then disable it again to get rid of the intermediate file.

Category
Compiler
Group
 
Status
Closed
Close date
2010-02-13 15:54
Assigned to
biplab
biplab 2010-02-13 15:54

If you don't clean pch file you may experience this. This is a compiler problem; not a Code::Blocks bug.

nixscripter 2010-02-13 21:21

So it's not Code::Blocks' fault that it doesn't check for files in the obj directory, even if they are not presently in the Makefile?