Make sure you use the same compile for lbrary and applications.
Either compile the library with MinGW or the application with MSVC.

Cheers,
_