Seems like a bug for me. I have this problem too, when I try to compile SDL code for multiple targets [Windows and Linux]. I'm forced to switch off all particular CPP files from other targets and switch them on only for the current target, because it doesn't work other way :? It seems like Code::Blocks is trying to compile particular CPP file using all the compilers specified from all the targets selected as owning this file.
Will this bug be fixed in future versions? When? It's very uncomfortable to play with those switches.