I just discovered another way to trigger the same thing. I moved some routines that I developed and tested as service procedures in another DLL into my own DLL. Since this step was planned before I wrote the first line of code, they were not marked for export and therefore used this default convention for the project, __cdecl. When I built the library, the build environment did not create the .LIB file. After some research and inspired by the mention of __declspec (dllimport) in this section, I realized that although I moved the declarations to the template header file generated by the New Project Wizard, I forgot to insert the name of the generated macro call into the prototypes.
With the specified calling convention, both in the header and in the CPP files containing the implementations, I received the expected .LIB file.
source share