With all the incredible smartness built into Windows 7, it is hard to tell what goes on, but it might be that Windows hides one or several files from Code::Blocks for some reason. Try not to have either your compiler or Code::Blocks or your development folder live anywhere near C:\Program Files.
You know, all users are idiots, so Windows has to be super smart in their place. Files must be hidden and rolled back, and processes must be denied accessing resources in undocumented ways without raising a warning. This greatly increases security and is much cheaper than fixing the 72 million exploits built into various OS components.
Legitimate users only use legitimate Microsoft products anyway which have been fine-tuned for that kind of OS behaviour, and everyone else can fuck off.