How to use libraries compiled with MingW in MSVC?
- by NumberFour
Hello,
I have compiled several libraries with MingW/MSYS... the generated static libraries are always .a files.
When I try to link the library with a MSVC project, Visual Studio throws 'unresolved external symbols' ... It means that the .a static library is incompatible with MS C++ Linker. I presume it has to be converted to a MSVC compatible .lib file.
Either .a and .lib are just AR archives of .o or .obj files, so is there any way how to use MingW compiled libs in a MSVC project? Or do I have to compile/link everything just in one compiler/linker - MSVC only/MingW only?
The MingW compiler is said to be compatible with MSVC.
I read a few threads about this topic, but they mostly say that renaming the file to .lib should do the work, but it unfortunately doesn't work for me.
Thanks for any advice.