If you make a virtual target, and rebuild it, targets are cleaned BEFORE all the targets builds ; so the first target build is correct, but starting from the second target build, the .o files of the first target build are re-used.
-------------- Clean: devel-ms in cb-oflp-plugin (compiler: GNU GCC Compiler)---------------
Cleaned "cb-oflp-plugin - devel-ms"
-------------- Clean: debug-ms in cb-oflp-plugin (compiler: GNU GCC Compiler)---------------
Cleaned "cb-oflp-plugin - debug-ms"
-------------- Clean: release-ms in cb-oflp-plugin (compiler: GNU GCC Compiler)---------------
Cleaned "cb-oflp-plugin - release-ms"
-------------- Build: devel-ms in cb-oflp-plugin (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -g -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN {...} -o obj\src\oflp-log.o
{...}
mingw32-g++.exe -g -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN {...} -o obj\src\oflp-settings.o
mingw32-g++.exe -shared -Wl,--dll {...} -o plugin\devel\ms\x32_4.9.2\OpenFilesListPlus.dll -mthreads -fmax-errors=0 -lcodeblocks -lwxmsw28u
Output file is plugin\devel\ms\x32_4.9.2\OpenFilesListPlus.dll with size 4.12 MB
Running target post-build steps
{...}
-------------- Build: debug-ms in cb-oflp-plugin (compiler: GNU GCC Compiler)---------------
{ MISSING MODULES COMPILATION HERE }
mingw32-g++.exe -shared -Wl,--dll {...} -o plugin\devel\ms\x32_4.9.2\OpenFilesListPlus.dll -mthreads -fmax-errors=0 -lcodeblocks -lwxmsw28u
Output file is plugin\debug\ms\x32_4.9.2\OpenFilesListPlus.dll with size 4.12 MB
Running target post-build steps
{...}
-------------- Build: release-ms in cb-oflp-plugin (compiler: GNU GCC Compiler)---------------
{ MISSING MODULES COMPILATION HERE }
mingw32-g++.exe -shared -Wl,--dll {...} -o plugin\devel\ms\x32_4.9.2\OpenFilesListPlus.dll -mthreads -fmax-errors=0 -lcodeblocks -lwxmsw28u
Output file is plugin\release\ms\x32_4.9.2\OpenFilesListPlus.dll with size 4.12 MB
Running target post-build steps
{...}
Process terminated with status 0 (0 minute(s), 22 second(s))
0 error(s), 0 warning(s) (0 minute(s), 22 second(s))
In the rebuild process, each target cleanup should occur just before the target build.