For a dll, if there is nothing to export, means there is no dllMain, and no def file(maybe more cases), then no lib file will be generated.
Easy to understand: lib file is used for other dll or exe thing in linking, in order to access exported things in the lib file related dll. Now for a dll there is nothing to export, it will be definitely meaningless to generate a lib file.