Now just to clarify things:
Codeblocks is not a compiler nor a linker. Codeblocks is a IDE that can be used with a lot compilers (see:
http://wiki.codeblocks.org/index.php/FAQ-General#Q:_What_is_Code::Blocks.3F and
http://wiki.codeblocks.org/index.php/FAQ-General#Q:_What_Code::Blocks_is_not.3F ).
You use mingw with gcc as compiler, but you could also use the microsoft compiler with codeblocks (it is called "cl", vs is short for visual studio and this is the ide of microsoft, not necessy the compiler)
The problem is, you can NOT mix libraries compiled with the microsoft compiler and mingw/gcc compiler in c++. With c it may work (it works also with c++, if you use the c abi)
If you try to mix the libraries, there can happen two things:
1) gcc can not find the library (the error message you get is similar, so we don't know if the compiler can't find the library in general, or if he can't find a compatible library)
2) you get strange linker errors about reference not found...