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
Simlar to Ebow Halm's answer, but using a .def file for listing the exported functions and newer command line arguments:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat" && cl /O2 /Iall /Iyour /Iincludes /D_USRDLL /D_WINDLL /DOTHER_DEFINES /LD /Fe /link /DEF:.def
References: