Depending on several factors, it may or may not work - and for several reasons. I suppose you mean full compatibility with reversibles.
For imbibs, which are used to associate DLLs with executable files, the answer is no .
I once tried to associate MSVC ++ implib with a dll created by gcc. If the formats were compatible, this would work when I renamed the libfoo.a library. To get around this, there is a utility called reimp that can create a suitable gcc implib from a DLL. To reverse the process, Microsoft's lib tool can create a static implib from a .def file, which gcc can create using a DLL if the correct flags are assigned to it. [Search "reimp" on the mingw website for more information]C ++ - compiled object files are also incompatible due to Name Mangling .
Different C ++ compilers change the names of variables and objects in different ways, resulting in "code [object] ... which usually doesn't bind"For a static library compiled as plain old C? <i> Yes
I need a little more information about what type of project you are, but if it is C and `copy libfoo.a foo.lib` works, it could be. Try to check if this works the other way around with Mingw or Dev-C ++. Edit : Actually, this will only work if the library is compiled with gcc on the Windows platform (and it works both ways!). the only exceptions to this AFAIK are cross-compiled libraries - MSVC refuses to take them with at least the one provided by Ubuntu βi586-mingw32msvc-arβ.
Another alternative explanation is that the MSVC linker is compatible with the .a format for historical reasons. IIRC, it has been since UNIX. Again, although I could see that this only works for pure C, not C ++.
EDIT : Actually, it's the other way around. The Windows version of the GCC toolkit creates static libraries compatible with the Microsoft COFF format.
source share