I've had this happen also. I've searched google, found no answers; just more questions.
And yes, wierdly, on occasion, the problem seems to fix itself.
But I think that's because I add or delete source statements or compile/link the source in a different order.
Even when it gives a line number for the error, the location is incorrect.
This is not a CodeBlocks problem, because I get the same error when compiling from the MSWindows cmd console.
I believe this is a compiler/linker bug. Or at least a very bad message/explanation.
I'm using:
mingw32-g++ (GCC) 3.4.4 (mingw special)
Copyright (C) 2004 Free Software Foundation, Inc.
I've found no answer to this problem except to search manually.
I do usually find multiple definitions somewhere. Or something that could be construed as multiple definitions.
Or, in my case, an "extern statement" that doesn't exactly match a signature;
Or a definition that works in C code but not in C++.
I get it alot when mixing my old C modules with new C++ code.
Or a definition in an included header (STL, wxWidgets, or the like) that duplicates one of my own functions.
Or a static definition in one module and a none static definition in another.