You seem to have two paths for compilers :
C:\mingw-w64\mingw64
and
C:\Program Files\CodeBlocks\MinGW
Both are used in the working test, for compiling (two sub \include paths) and for linking (two sub \lib paths).
Normally, you should have only one \include path and one \lib path. Two paths may give conflicts, especially if they are different.
The second compiler path, is, I suppose, for the installed compiler distributed with Code::Blocks (winlibs 14.2). How did you obtain the content of C:\mingw-w64\mingw64 ?
And how is configured your "GNU GCC Compiler" and your "GNU GCC MinGW64 Compiler".
As I saided previously, it looks like you have two compilers installed in two different places. But I'm not on your PC and cannot check this for you.