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
On the command line use:
cl.exe /LD
or, if you prefer the more verbose & explicit version:
cl.exe /D_USRDLL /D_WINDLL /link /DLL /OUT:.dll