是否可以在 Windows 上使用 g++ (mingw) 编译的应用程序中使用 Visual Studio 编译的库?
Is it possible to use a library compiled by visual studio in an application compiled by g++ (mingw) on Windows?
如果库是用 C++ 编写的并公开 C++ 接口:否(因为 g++ 和 VC++ 的名称修改不同).
If the library is written in C++ and exposes a C++ interface: no (because the name-mangling differs between g++ and VC++).
如果库是用 C 编写的静态库(或带有 extern "C" 接口):是的,但有一些注意事项.
If the library is a static library written in C (or with an extern "C" interface): yes, but certain caveats apply.
如果库是带有 C 接口的 DLL:是的,但是你'必须创建自己的导入库.
If the library is a DLL with a C interface: yes, but you'll have to create your own import library.
这篇关于在由 g++ (mingw) 编译的应用程序中使用由 Visual Studio 编译的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
读取输入文件,最快的方法?read input files, fastest way possible?(读取输入文件,最快的方法?)
在 C++ 中读取格式化输入的最简单方法?The easiest way to read formatted input in C++?(在 C++ 中读取格式化输入的最简单方法?)
从 .txt 文件读取到 C++ 中的二维数组Reading from .txt file into two dimensional array in c++(从 .txt 文件读取到 C++ 中的二维数组)
如何在 C++ 中模拟按键按下How to simulate a key press in C++(如何在 C++ 中模拟按键按下)
为什么在 cin.ignore() 之后没有 getline(cin, var) 读取Why doesn#39;t getline(cin, var) after cin.ignore() read the first character of the string?(为什么在 cin.ignore() 之后没有 getline(cin, var) 读取
scanf 格式输入的 cin 类比是什么?What is the cin analougus of scanf formatted input?(scanf 格式输入的 cin 类比是什么?)