- If the library is written in C++ and exposes a C++ interface: no (because the name-mangling differs between g++ and VC++).
- If the library is a static library written in C (or with an
extern "C"
interface): yes, but certain caveats apply. - If the library is a DLL with a C interface: yes, but you'll have to create your own import library.
Here are more resources:
- C++ Dynamic Library Compiling/Linking
- Interoperability of Libraries Created by Different Compiler Brands
- C++: Dll compatibility between compilers
- Importing a dll from a different compiler
- Using C++ DLLs with different compiler versions
- Can I link object files made by one compile to those made by another one?
- Building Windows DLLs with MinGW