I\'ve been doing C for about 20 years but I\'ve never built a DLL; I\'ve always prefered to statically link.
I use the command line - cl.exe, etc - and gnumake makef
Turns out it happens automatically.
If you have exported functions (e.g. /export, __declspec(dllexport), etc) the linker will automatically generate the .lib file (you do of course need /dll on the linker command line).