是否可以在Windows上用g++(mingw)编译的应用程序使用visual studio编译的库?
最佳答案
如果库是用 C++ 编写的并且公开了 C++ 接口(interface):否(因为名称修饰在 g++ 和 VC++ 之间不同)。
如果库是用 C 编写的静态库(或使用
extern "C"
接口(interface)):yes, but certain caveats apply .如果库是带有 C 接口(interface)的 DLL:yes, but you'll have to create your own import library .
关于c++ - 在 g++ (mingw) 编译的应用程序中使用用 visual studio 编译的库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1138170/