既然是动态库,也就是dll,那么mingw是可以链接的。 如果你确定dll里面的函数是stdcall调用方式,而不是cdecl,那么需要使用pexports工具生成一下模块定义文件(标准def文件)。 pexports.exe -v xxx.dll > xxx.def 然后使用mingw自带的dlltool工具,利用上一步生成def文件来创建.a文件。 dlltool --dllname xxx.dll --d...
既然是动态库,也就是dll,那么mingw是可以链接的。 如果你确定dll里面的函数是stdcall调用方式,而不是cdecl,那么需要使用pexports工具生成一下模块定义文件(标准def文件)。 pexports.exe -v xxx.dll > xxx.def 1. 然后使用mingw自带的dlltool工具,利用...
However, for __stdcall functions, the above method does not work. For MSVC will prefix an underscore to __stdcall functions while MinGW will not. The right way is to produce the DEF file using the pexports tool included in the mingw-utils package and filter off the first underscore by sed...