How to use GCC to build DLL by DEF file in MinGW?
The “How to generate DLL files by GCC in the MinGW” has described how to generate DLL file by the declaring prefix(__declspec( dllexport ) or __declspec( dllimport )) of functions + GCC tools(GCC, pexports). In normal case, it is enough to cater for the user requirements, but if users want to add anonymous functions or change the calling conventions(__stdcall, __cdecl, __pascal), how to do?
DEF file can play a role of these requirements. Firstly, let’s understand the format of DEF.
LIBRARY DllName.dll EXPORTS [__stdcall/__cdecl/__pascal]DllFunction[@BytesOfParamList] @SlotNumber … IMPORTS OtherDllName.OtherDllFunction |