OK, I found a problem.
Open Code::Blocks and create a new file (the code can be as simple as an empty int main). Now, click on Build.
I always have to click twice to get it compiled and linked.
When the .o file isn't created, the linker will fail, but if the code is correct it'll compile. If you click on Build again it'll link. If you change something in the file and click on Build again, the old .o file will be linked and a new .o file will be created (due to the changes). Once again I have to click twice to get the latest changes in the exe.
NOTE: I'm using 3 threads for compilation.